2024-10-07 14:19:27 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: 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";
|
2024-05-25 18:34:37 +01:00
|
|
|
hasOptinPersistence = config.environment.persistence ? "/persist";
|
2024-10-07 14:19:27 +01:00
|
|
|
in {
|
2024-05-12 19:58:55 +01:00
|
|
|
imports = [
|
|
|
|
inputs.sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
|
|
|
|
sops = {
|
|
|
|
defaultSopsFile = "${secretsFile}";
|
|
|
|
validateSopsFiles = false;
|
|
|
|
|
2024-05-19 23:33:42 +01:00
|
|
|
age = {
|
2024-10-07 14:19:27 +01:00
|
|
|
sshKeyPaths = ["${lib.optionalString hasOptinPersistence "/persist"}/etc/ssh/ssh_host_ed25519_key"];
|
2024-05-21 19:11:23 +01:00
|
|
|
};
|
2024-06-17 20:20:33 +01:00
|
|
|
secrets = {
|
|
|
|
"passwords/root".neededForUsers = true;
|
2024-07-20 16:14:09 +01:00
|
|
|
"ssh_keys/deploy_key/id_ed25519" = {
|
|
|
|
path = "/etc/ssh/deploy_key-ssh-ed25519";
|
|
|
|
};
|
2024-05-23 10:48:00 +01:00
|
|
|
};
|
2024-05-12 19:58:55 +01:00
|
|
|
};
|
|
|
|
}
|