diff --git a/hosts/PW05CH3L/configuration.nix b/hosts/PW05CH3L/configuration.nix index 0e43f0a5..d42e7a99 100644 --- a/hosts/PW05CH3L/configuration.nix +++ b/hosts/PW05CH3L/configuration.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, ... }: +{ inputs, ... }: { imports = [ @@ -11,15 +11,6 @@ ../../users/opdavies.nix ]; - features = { - cli = { - password-store.enable = true; - password-store.extensions = with pkgs.passExtensions; [ - pass-otp - ]; - }; - }; - wsl = { enable = true; defaultUser = "opdavies"; diff --git a/hosts/t480/configuration.nix b/hosts/t480/configuration.nix index af703ea9..7fcbd679 100644 --- a/hosts/t480/configuration.nix +++ b/hosts/t480/configuration.nix @@ -25,13 +25,6 @@ kanata.devices = [ "/dev/input/by-path/platform-i8042-serio-0-event-kbd" ]; - - password-store.enable = true; - password-store.extensions = with pkgs.passExtensions; [ - pass-audit - pass-otp - pass-update - ]; }; core = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index c10186d5..7d90a936 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -11,7 +11,6 @@ ./nix-index.nix ./nixpad ./openssh.nix - ./password-store.nix ./pipewire.nix ./podman.nix ./st.nix diff --git a/modules/nixos/password-store.nix b/modules/nixos/password-store.nix deleted file mode 100644 index 61331aee..00000000 --- a/modules/nixos/password-store.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -with lib; - -let - cfg = config.features.cli.password-store; -in -{ - options.features.cli.password-store = { - enable = mkEnableOption "Enable pass"; - - extensions = mkOption { - default = [ ]; - type = types.listOf types.package; - description = "pass extensions to install."; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - (pass.withExtensions (e: with e; cfg.extensions)) - ]; - }; -} diff --git a/modules2/hosts/t480/password-store.nix b/modules2/hosts/t480/password-store.nix new file mode 100644 index 00000000..e40d892b --- /dev/null +++ b/modules2/hosts/t480/password-store.nix @@ -0,0 +1,11 @@ +{ + flake.modules.homeManager.base = + { pkgs, ... }: + { + programs.password-store.extensions = with pkgs.passExtensions; [ + pass-audit + pass-otp + pass-update + ]; + }; +} diff --git a/modules2/password-store/enable.nix b/modules2/password-store/enable.nix new file mode 100644 index 00000000..e5022dee --- /dev/null +++ b/modules2/password-store/enable.nix @@ -0,0 +1,3 @@ +{ + flake.modules.homeManager.base.programs.password-store.enable = true; +} diff --git a/modules2/password-store/package.nix b/modules2/password-store/package.nix new file mode 100644 index 00000000..781a0e5d --- /dev/null +++ b/modules2/password-store/package.nix @@ -0,0 +1,17 @@ +{ lib, ... }: + +{ + flake.modules.homeManager.base = + { config, pkgs, ... }: + { + options.programs.password-store.extensions = lib.mkOption { + default = [ ]; + type = lib.types.listOf lib.types.package; + description = "pass extensions to install."; + }; + + config.programs.password-store.package = pkgs.pass.withExtensions ( + e: with e; config.programs.password-store.extensions + ); + }; +} diff --git a/modules2/password-store/settings.nix b/modules2/password-store/settings.nix new file mode 100644 index 00000000..e4dd4374 --- /dev/null +++ b/modules2/password-store/settings.nix @@ -0,0 +1,7 @@ +{ + flake.modules.homeManager.base = + { config, ... }: + { + programs.password-store.settings.PASSWORD_STORE_DIR = "${config.xdg.dataHome}/pass"; + }; +}