From 952d27ae4c87214e8a56e6de5d18a92d64d62fac Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Tue, 7 Apr 2026 17:31:14 +0200 Subject: [PATCH] Fix CCID bundle setup: symlink entire bundle directory instead of contents --- nixos/modules/yubikey.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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