diff options
Diffstat (limited to 'profiles')
| -rw-r--r-- | profiles/core/secrets.nix | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/profiles/core/secrets.nix b/profiles/core/secrets.nix index 12b8a95..cacfcb7 100644 --- a/profiles/core/secrets.nix +++ b/profiles/core/secrets.nix @@ -19,22 +19,24 @@ in inputs.sops-nix.nixosModules.sops (mkAliasOptionModule [ "secrets" ] [ "sops" "secrets" ]) # TODO: get my username(s) from machine config ]; - sops = { - secrets = attrsets.mergeAttrsList - [ - (getSecrets "${inputs.self}/secrets") - (getSecrets "${inputs.self}/secrets/${machine.hostname}") - ]; - }; + config = mkIf machine.secrets { + sops = { + secrets = attrsets.mergeAttrsList + [ + (getSecrets "${inputs.self}/secrets") + (getSecrets "${inputs.self}/secrets/${machine.hostname}") + ]; + }; - environment = { - systemPackages = [ - pkgs.sops - pkgs.age - ]; - }; + environment = { + systemPackages = [ + pkgs.sops + pkgs.age + ]; + }; - hm = { - programs.password-store.enable = true; + hm = { + programs.password-store.enable = true; + }; }; } |
