23 lines
643 B
Nix
23 lines
643 B
Nix
|
|
{ pkgs, ... }:
|
||
|
|
|
||
|
|
{
|
||
|
|
# Create the plugdev group (required for user-space USB access to YubiKey)
|
||
|
|
users.groups.plugdev = {};
|
||
|
|
|
||
|
|
# Enable PC/SC daemon — required for GPG smartcard (gpg --card-status) and YubiKey
|
||
|
|
services.pcscd.enable = true;
|
||
|
|
|
||
|
|
# udev rules so the YubiKey gets plugdev group ownership and correct permissions
|
||
|
|
services.udev.packages = with pkgs; [
|
||
|
|
yubikey-personalization
|
||
|
|
libu2f-host
|
||
|
|
];
|
||
|
|
|
||
|
|
# YubiKey management tools
|
||
|
|
environment.systemPackages = with pkgs; [
|
||
|
|
yubikey-manager # ykman CLI
|
||
|
|
yubikey-personalization # ykpers / ykchalresp
|
||
|
|
yubico-piv-tool # PIV applet management
|
||
|
|
];
|
||
|
|
}
|