optional sops

This commit is contained in:
Peder Bergebakken Sundt 2023-12-03 20:53:16 +01:00
parent cce5a3a8f4
commit 1f6e3c2509
1 changed files with 3 additions and 2 deletions

View File

@ -111,8 +111,9 @@
] ++ modules; ] ++ modules;
#++ flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work #++ flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work
sops = lib.mkIf (builtins.pathExists ./secrets/${hostname}.yaml) { sops = {
defaultSopsFile = ./secrets/${hostname}.yaml; defaultSopsFile = lib.mkIf (builtins.pathExists ./secrets/${hostname}.yaml)
./secrets/${hostname}.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
age.keyFile = "/var/lib/sops-nix/key.txt"; age.keyFile = "/var/lib/sops-nix/key.txt";
age.generateKey = true; age.generateKey = true;