nixos/modules/sops.nix
2024-07-09 13:26:55 -04:00

16 lines
367 B
Nix

{
config,
lib,
sops-nix,
self',
}:
{
imports = [ sops-nix.nixosModules.sops ];
options.local.sops.disable = lib.mkEnableOption "";
config = lib.mkIf (!config.local.sops.disable) {
sops = {
defaultSopsFile = "${self'}/hosts/${config.networking.hostName}/secrets.yaml";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
};
};
}