Add sops secrets file per user

This commit is contained in:
Pim Kunis 2024-11-21 21:10:24 +01:00
parent 9d1a695e3a
commit a5be4ddbb2
6 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@ creation_rules:
key_groups: key_groups:
- age: - age:
- *sue_root - *sue_root
- path_regex: machines/sue/home.sops.yaml - path_regex: machines/sue/pim.sops.yaml
key_groups: key_groups:
- age: - age:
- *sue_pim - *sue_pim
@ -21,7 +21,7 @@ creation_rules:
- *sue_pim - *sue_pim
- *sue_root - *sue_root
- *gamepc_root - *gamepc_root
- path_regex: machines/gamepc/home.sops.yaml - path_regex: machines/gamepc/pim.sops.yaml
key_groups: key_groups:
- age: - age:
- *sue_pim - *sue_pim

View file

@ -39,7 +39,7 @@ in {
}; };
pim-sops-age-key = { pim-sops-age-key = {
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/home.sops.yaml"]; keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/pim.sops.yaml"];
name = "keys.txt"; name = "keys.txt";
destDir = "/home/pim/.config/sops/age"; destDir = "/home/pim/.config/sops/age";
user = "pim"; user = "pim";

View file

@ -35,7 +35,7 @@ in {
}; };
pim-sops-age-key = { pim-sops-age-key = {
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/home.sops.yaml"]; keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/pim.sops.yaml"];
name = "keys.txt"; name = "keys.txt";
destDir = "/home/pim/.config/sops/age"; destDir = "/home/pim/.config/sops/age";
user = "pim"; user = "pim";

View file

@ -22,7 +22,7 @@
}; };
sops = { sops = {
defaultSopsFile = ./home.sops.yaml; defaultSopsFile = ./pim.sops.yaml;
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
secrets."keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini"; secrets."keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini";
}; };