mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
Improve restic extraConfig handling
This commit is contained in:
parent
a17ae8c58d
commit
b6865e10bf
1 changed files with 17 additions and 15 deletions
|
|
@ -61,21 +61,23 @@ in
|
||||||
|
|
||||||
services.restic.backups = lib.mapAttrs (
|
services.restic.backups = lib.mapAttrs (
|
||||||
name: value:
|
name: value:
|
||||||
{
|
lib.mkMerge [
|
||||||
inherit (value) user;
|
{
|
||||||
initialize = true;
|
inherit (value) user;
|
||||||
repository = "s3:https://s3.eu-central-003.backblazeb2.com/stork-atlas/${name}";
|
initialize = true;
|
||||||
environmentFile =
|
repository = "s3:https://s3.eu-central-003.backblazeb2.com/stork-atlas/${name}";
|
||||||
config.sops.secrets."restic/environment".path or "/run/secrets/restic/environment";
|
environmentFile =
|
||||||
passwordFile = config.sops.secrets."restic/password".path or "/run/secrets/restic/password";
|
config.sops.secrets."restic/environment".path or "/run/secrets/restic/environment";
|
||||||
pruneOpts = [
|
passwordFile = config.sops.secrets."restic/password".path or "/run/secrets/restic/password";
|
||||||
"--keep-daily 7"
|
pruneOpts = [
|
||||||
"--keep-weekly 5"
|
"--keep-daily 7"
|
||||||
"--keep-monthly 6"
|
"--keep-weekly 5"
|
||||||
"--keep-yearly 1"
|
"--keep-monthly 6"
|
||||||
];
|
"--keep-yearly 1"
|
||||||
}
|
];
|
||||||
// value.extraConfig
|
}
|
||||||
|
value.extraConfig
|
||||||
|
]
|
||||||
) cfg;
|
) cfg;
|
||||||
|
|
||||||
systemd.services = lib.mkMerge [
|
systemd.services = lib.mkMerge [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue