nixos/home/common/optional/sops.nix

28 lines
612 B
Nix
Raw Normal View History

2024-05-12 19:58:55 +01:00
{ inputs, config, ... }:
let
2024-05-14 14:51:09 +01:00
secretsDirectory = builtins.toString inputs.nix-secrets;
secretsFile = "${secretsDirectory}/secrets.yaml";
2024-05-12 19:58:55 +01:00
homeDirectory = config.home.homeDirectory;
in
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = {
age.keyFile = "${homeDirectory}/.config/sops/age/keys.txt";
defaultSopsFile = "${secretsFile}";
validateSopsFiles = false;
secrets = {
2024-05-15 15:39:30 +01:00
"ssh_keys/sam/gitea" = {
path = "${homeDirectory}/.ssh/gitea";
2024-05-12 20:45:37 +01:00
};
2024-05-15 15:39:30 +01:00
"ssh_keys/sam/gitea.pub" = {
path = "${homeDirectory}/.ssh/gitea.pub";
2024-05-12 19:58:55 +01:00
};
};
};
}