infrastructure/services/restic.nix
hexchen e9c5f1c101
services: init restic backup
activate on all relevant hosts
2021-04-21 15:00:44 +01:00

24 lines
534 B
Nix

{ config, lib, pkgs, ... }:
{
services.restic.backups.tardis = {
passwordFile = "/etc/restic/system";
paths = [
"/home"
"/var/lib"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 12"
];
repository = "";
};
systemd.services."restic-backups-tardis".environment.RESTIC_REPOSITORY_FILE = "/etc/restic/system.repo";
services.postgresqlBackup = {
enable = config.service.postgresql.enable;
backupAll = true;
startAt = "*-*-* 23:45:00";
};
}