nixos/hosts/common/core/sops.nix

23 lines
508 B
Nix
Raw Normal View History

2024-05-12 19:58:55 +01:00
{ pkgs, inputs, config, configVars, ... }:
let
2024-05-14 14:51:09 +01:00
secretsDirectory = builtins.toString inputs.nix-secrets;
2024-05-12 19:58:55 +01:00
secretsFile = "${secretsDirectory}/secrets.yaml";
homeDirectory = "/home/${configVars.username}";
in
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = "${secretsFile}";
validateSopsFiles = false;
age = {
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
};
}