Create home-manager module for sops
This commit is contained in:
parent
8c35cb9f61
commit
9ccbf41324
4 changed files with 26 additions and 11 deletions
|
@ -12,7 +12,7 @@
|
|||
./gnome.nix
|
||||
./syncthing.nix
|
||||
./vscode.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
./sops.nix
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
];
|
||||
|
||||
|
@ -245,13 +245,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
|
||||
defaultSopsFile = "${self}/secrets/pim.yaml";
|
||||
|
||||
secrets = {
|
||||
"keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
23
home-manager/sops.nix
Normal file
23
home-manager/sops.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
syncthing.enable = true;
|
||||
neovim.enable = true;
|
||||
firefox.enable = true;
|
||||
sops.enable = true;
|
||||
};
|
||||
|
||||
home.packages =
|
||||
|
|
|
@ -12,7 +12,7 @@ in {
|
|||
options.pim.sops.enable = lib.mkEnableOption "sops";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
environment.systemPackages = [pkgs.sops];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/pim/.config/sops/age/keys.txt";
|
||||
|
|
Loading…
Reference in a new issue