mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
systemd's 60-fido-id.rules marks the FIDO hidraw node and the CCID USB device as security tokens, and 70-uaccess.rules grants them to the active seat. Drop the hand-written rules and the plugdev membership. Assisted-by: Claude Code (claude-opus-5-5)
25 lines
445 B
Nix
25 lines
445 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.modules.desktop.canokey;
|
|
in
|
|
{
|
|
options.modules.desktop.canokey = {
|
|
enable = lib.mkEnableOption "CanoKey hardware security key support";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# systemd tags FIDO/CCID devices uaccess (60-fido-id.rules); pcscd covers OpenPGP.
|
|
services.pcscd.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
ccid
|
|
pcsc-tools
|
|
];
|
|
};
|
|
}
|