nixos/home/common/optional/sops.nix

27 lines
551 B
Nix

{ inputs, config, ... }:
let
secretsFile = ../../../secrets.yaml;
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 = {
"ssh_keys/sam/private" = {
path = "${homeDirectory}/.ssh/openssh_key";
};
"ssh_keys/sam/public" = {
path = "${homeDirectory}/.ssh/openssh_key.pub";
};
};
};
}