Manage user level secrets with sops

This commit is contained in:
SebastianStork 2024-04-27 22:27:48 +02:00
parent b6e03035f6
commit c170ec09db
6 changed files with 59 additions and 11 deletions

View file

@ -8,5 +8,6 @@
./neovim.nix
./kitty.nix
./equalizer
./sops.nix
];
}

17
modules/home/sops.nix Normal file
View file

@ -0,0 +1,17 @@
{
inputs,
config,
lib,
...
}: {
imports = [inputs.sops-nix.homeManagerModules.sops];
options.myConfig.sops.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.sops.enable {
sops = {
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
defaultSopsFile = "${inputs.self}/home/${config.home.username}/secrets.yaml";
};
};
}