refactor: nest sops options

This commit is contained in:
gwg313 2024-01-06 16:44:49 -05:00
parent 023e0fded2
commit 08d5398b4f
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
2 changed files with 9 additions and 5 deletions

View file

@ -3,6 +3,10 @@
user, user,
... ...
}: { }: {
sops.secrets.restic_key = {
owner = config.users.users.${user}.name;
};
services.restic.backups = { services.restic.backups = {
backups = { backups = {
user = "${user}"; user = "${user}";

View file

@ -53,11 +53,11 @@
initrd.luks.devices."luks-b13379b3-2025-4d55-a40a-c0f3ad8ec801".device = "/dev/disk/by-uuid/b13379b3-2025-4d55-a40a-c0f3ad8ec801"; initrd.luks.devices."luks-b13379b3-2025-4d55-a40a-c0f3ad8ec801".device = "/dev/disk/by-uuid/b13379b3-2025-4d55-a40a-c0f3ad8ec801";
}; };
sops.defaultSopsFile = ../../secrets/secrets.yaml; # sops
sops.defaultSopsFormat = "yaml"; sops = {
sops.age.keyFile = "/home/${user}/.config/sops/age/keys.txt"; defaultSopsFile = ../../secrets/secrets.yaml;
sops.secrets.restic_key = { defaultSopsFormat = "yaml";
owner = config.users.users.${user}.name; age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
}; };
nixpkgs = { nixpkgs = {