From f5cfd501830e310e42de7162fdd59a7dee4456b1 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Thu, 21 Nov 2024 01:42:04 -0600 Subject: [PATCH] modularize yubikey --- home/modules/default.nix | 1 + home/modules/yubikey.nix | 20 +++++++++++++++++++ .../fabian@posixlycorrect/apps/default.nix | 3 --- .../fabian@posixlycorrect/default.nix | 1 + 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 home/modules/yubikey.nix diff --git a/home/modules/default.nix b/home/modules/default.nix index 00d0787..aa0c1ea 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -9,5 +9,6 @@ ./neovim.nix ./baseline.nix ./steam + ./yubikey.nix ]; } diff --git a/home/modules/yubikey.nix b/home/modules/yubikey.nix new file mode 100644 index 0000000..b0b3595 --- /dev/null +++ b/home/modules/yubikey.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.apps.yubikey; +in { + options.local.apps.yubikey = { + enable = mkEnableOption "Yubikey home settings"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + yubikey-manager + yubico-pam + yubikey-personalization + ]; + }; +} diff --git a/home/platforms/fabian@posixlycorrect/apps/default.nix b/home/platforms/fabian@posixlycorrect/apps/default.nix index b8a3d9f..5d9ce2d 100644 --- a/home/platforms/fabian@posixlycorrect/apps/default.nix +++ b/home/platforms/fabian@posixlycorrect/apps/default.nix @@ -34,9 +34,6 @@ vlc vpsfree-client vscodium-fhs - yubikey-manager - yubico-pam - yubikey-personalization zola zoom-us ]; diff --git a/home/platforms/fabian@posixlycorrect/default.nix b/home/platforms/fabian@posixlycorrect/default.nix index 6480312..f63305f 100644 --- a/home/platforms/fabian@posixlycorrect/default.nix +++ b/home/platforms/fabian@posixlycorrect/default.nix @@ -18,6 +18,7 @@ terminal.enable = true; neovim.enable = true; steam.enable = true; + yubikey.enable = true; }; };