Files
nix-config/modules/nixos/desktop/canokey.nix
T
Ryan Yin 04a8438bd3 refactor(canokey): rely on systemd uaccess rules instead of custom udev
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)
2026-11-01 11:55:14 -06:00

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
];
};
}