diff --git a/home-manager/cli/default.nix b/home-manager/cli/default.nix index f495cb0..5752856 100644 --- a/home-manager/cli/default.nix +++ b/home-manager/cli/default.nix @@ -1,10 +1,6 @@ { ... }: { imports = [ - ./pass.nix - ./gnupg.nix - ./bat.nix - ./eza.nix ./direnv.nix ]; } diff --git a/home-manager/cli/gnupg.nix b/home-manager/cli/gnupg.nix deleted file mode 100644 index 90b9b86..0000000 --- a/home-manager/cli/gnupg.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - pinentry-gnome - pkgs.gcr - ]; - - programs.gpg = { - enable = true; - scdaemonSettings = { - disable-ccid = true; - }; - }; - services.gpg-agent = { - enable = true; - enableScDaemon = true; - enableZshIntegration = true; - pinentryFlavor = "gnome3"; - }; -} diff --git a/home-manager/cli/pass.nix b/home-manager/cli/pass.nix deleted file mode 100644 index 1f129f7..0000000 --- a/home-manager/cli/pass.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - programs.password-store = { - enable = true; - }; -} diff --git a/hosts/luci/home-config.nix b/hosts/luci/home-config.nix index babdfaa..8862230 100644 --- a/hosts/luci/home-config.nix +++ b/hosts/luci/home-config.nix @@ -1,6 +1,7 @@ { ... }: { config.modules = { application = { + gnupg.enable = true; zathura.enable = true; foot.enable = true; }; diff --git a/modules/home-manager/application/gnupg/default.nix b/modules/home-manager/application/gnupg/default.nix new file mode 100644 index 0000000..b352974 --- /dev/null +++ b/modules/home-manager/application/gnupg/default.nix @@ -0,0 +1,41 @@ +{ lib, config, pkgs, ... }: +with lib; +let + cfg = config.modules.application.gnupg; +in +{ + options.modules.application.gnupg = { + enable = mkEnableOption "enable GnuPG and related utils"; + + pass = mkOption { + type = types.bool; + default = true; + description = "install password-store"; + }; + }; + config = mkIf cfg.enable { + + home.packages = with pkgs; [ + pinentry-gnome + pkgs.gcr + ]; + + programs.gpg = { + enable = true; + scdaemonSettings = { + disable-ccid = true; + }; + }; + + services.gpg-agent = { + enable = true; + enableScDaemon = true; + enableZshIntegration = true; + pinentryFlavor = "gnome3"; + }; + + programs.password-store = { + enable = cfg.pass; + }; + }; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 42146ad..e400610 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -2,6 +2,7 @@ { imports = [ ./application/foot + ./application/gnupg ./application/imv ./application/zathura ./cli/ghq/default.nix