services: init restic backup

activate on all relevant hosts
This commit is contained in:
hexchen 2021-04-21 13:49:27 +00:00 committed by kat witch
parent cc72f12a6d
commit e9c5f1c101
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
4 changed files with 27 additions and 0 deletions

24
services/restic.nix Normal file
View file

@ -0,0 +1,24 @@
{ 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";
};
}