mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-02-04 09:10:01 +01:00
base: configure sops
This commit is contained in:
12
base/sops.nix
Normal file
12
base/sops.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, fp, lib, ... }:
|
||||
{
|
||||
sops.defaultSopsFile = let
|
||||
secretsFilePath = fp /secrets/${config.networking.hostName}/${config.networking.hostName}.yaml;
|
||||
in lib.mkIf (builtins.pathExists secretsFilePath) secretsFilePath;
|
||||
|
||||
sops.age = lib.mkIf (config.sops.defaultSopsFile != null) {
|
||||
sshKeyPaths = lib.mkDefault [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user