diff --git a/nixos/modules/hardware/default.nix b/nixos/modules/hardware/default.nix index efa0833..f77ad04 100644 --- a/nixos/modules/hardware/default.nix +++ b/nixos/modules/hardware/default.nix @@ -1,5 +1,6 @@ { imports = [ ./nvidia + ./yubikey ]; } diff --git a/nixos/modules/hardware/yubikey/default.nix b/nixos/modules/hardware/yubikey/default.nix new file mode 100644 index 0000000..8deb1ed --- /dev/null +++ b/nixos/modules/hardware/yubikey/default.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.sisyphus.hardware.yubikey; +in { + options.sisyphus.hardware.yubikey.enable = lib.mkEnableOption "YubiKey support"; + + config = lib.mkIf cfg.enable { + # Enable smart card reading + services.pcscd.enable = true; + + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "curses"; + }; + }; +}