backup: add extra paths

This commit is contained in:
Sandro - 2023-05-18 17:15:45 +02:00
parent 299a30d838
commit ba1905778e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 16 additions and 2 deletions

View File

@ -41,8 +41,22 @@ in
];
initialize = true;
passwordFile = config.sops.secrets."restic/password".path;
paths = cfg.paths
++ lib.optionals config.services.postgresql.enable [ "/var/backup/postgresql/" ];
paths = [
"/etc/group"
"/etc/machine-id"
"/etc/passwd"
"/etc/shadow"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/subgid"
"/etc/subuid"
"/var/lib/nixos/"
] ++ cfg.paths
++ lib.optional config.services.postgresql.enable "/var/backup/postgresql/"
++ lib.optional (config.security.acme.certs != {}) "/var/lib/acme/"
++ lib.optional config.security.dhparams.enable "/var/lib/dhparams/";
pruneOpts = [
"--group-by host"
"--keep-daily 7"