diff --git a/nixos/modules/yubikey.nix b/nixos/modules/yubikey.nix index 660ca7a..9bb79f3 100644 --- a/nixos/modules/yubikey.nix +++ b/nixos/modules/yubikey.nix @@ -16,9 +16,10 @@ # CCID driver for smartcard access (required for YubiKey CCID functionality) # Set up the PC/SC drivers directory with CCID driver bundle system.activationScripts.pcscdSetup = '' - mkdir -p /var/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux - # Symlink CCID driver bundle - ln -sf "${pkgs.ccid}/pcsc/drivers/ifd-ccid.bundle"/* /var/lib/pcsc/drivers/ifd-ccid.bundle/ 2>/dev/null || true + mkdir -p /var/lib/pcsc/drivers + # Symlink the entire CCID bundle (or create it if it doesn't exist) + rm -rf /var/lib/pcsc/drivers/ifd-ccid.bundle 2>/dev/null || true + ln -sf "${pkgs.ccid}/pcsc/drivers/ifd-ccid.bundle" /var/lib/pcsc/drivers/ifd-ccid.bundle ''; # YubiKey management tools