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;
#++ flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work
sops = lib.mkIf (builtins.pathExists ./secrets/${hostname}.yaml) {
defaultSopsFile = ./secrets/${hostname}.yaml;
sops = {
defaultSopsFile = lib.mkIf (builtins.pathExists ./secrets/${hostname}.yaml)
./secrets/${hostname}.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
age.keyFile = "/var/lib/sops-nix/key.txt";
age.generateKey = true;