nixos/home/modules/sops.nix

40 lines
852 B
Nix
Raw Normal View History

2024-07-09 03:35:25 +00:00
{ lib, config, inputs, ... }:
let
cfg = config.snowhawk.sops;
home = config.home.homeDirectory;
in
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
options.snowhawk.sops = {
enable = lib.mkEnableOption "sops";
};
config = lib.mkIf cfg.enable {
sops = {
age.keyFile = "${home}/.config/sops/age/keys.txt";
defaultSopsFile = ../../secrets.yaml;
validateSopsFiles = false;
secrets = {
"private_keys/personal_git" = {
path = "${home}/.ssh/personal_git";
};
2024-07-09 08:47:23 +00:00
"private_keys/msiserver" = {
path = "${home}/.ssh/msiserver";
};
2024-07-11 12:58:16 +00:00
"private_keys/caveserver" = {
path = "${home}/.ssh/caveserver";
};
2024-07-11 12:22:08 +00:00
"ssh_hosts/caveserver" = {
path = "${home}/.ssh/conf.d/caveserver_config";
};
2024-07-09 03:35:25 +00:00
};
};
};
}