nixos/hosts/common/core/sops.nix

26 lines
577 B
Nix
Raw Normal View History

{ pkgs, inputs, config, ... }:
2024-05-12 19:58:55 +01:00
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";
hostname = config.networking.hostName;
2024-05-12 19:58:55 +01:00
in
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = "${secretsFile}";
validateSopsFiles = false;
2024-05-19 23:33:42 +01:00
age = {
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
};
secrets = {
"passwords/root".neededForUsers = true;
"passwords/sam".neededForUsers = true;
2024-05-22 17:23:17 +01:00
"passwords/media".neededForUsers = true;
2024-05-12 19:58:55 +01:00
};
};
}