Refactor sops stuff

This commit is contained in:
Pim Kunis 2024-11-17 21:04:03 +01:00
parent 92514e08c3
commit 85b41d6722
11 changed files with 73 additions and 101 deletions

View file

@ -2,7 +2,6 @@
lib,
config,
inputs,
self,
...
}: {
imports = [
@ -12,8 +11,8 @@
./gnome.nix
./syncthing.nix
./vscode.nix
./sops.nix
inputs.nix-index-database.hmModules.nix-index
inputs.sops-nix.homeManagerModules.sops
];
xsession.enable = true;

View file

@ -1,23 +0,0 @@
{
self,
config,
inputs,
lib,
...
}: let
cfg = config.pim.sops;
in {
imports = [inputs.sops-nix.homeManagerModules.sops];
options.pim.sops.enable = lib.mkEnableOption "sops";
config = lib.mkIf cfg.enable {
sops = {
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
defaultSopsFile = "${self}/secrets/pim.yaml";
secrets = {
"keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini";
};
};
};
}