diff options
Diffstat (limited to 'sys/hardware/yubico.nix')
| -rw-r--r-- | sys/hardware/yubico.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/hardware/yubico.nix b/sys/hardware/yubico.nix new file mode 100644 index 0000000..0c8478c --- /dev/null +++ b/sys/hardware/yubico.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.hardware.yubico; +in { + options.local.hardware.yubico = { + enable = mkEnableOption "Yubico hardware support"; + }; + + config = mkIf cfg.enable { + environment.etc."pkcs11/modules/ykcs11".text = '' + module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so + ''; + + services = { + pcscd.enable = true; + udev.packages = [pkgs.yubikey-personalization]; + }; + }; +} |
