nixconfig/modules/nixos/orac/restic.nix
2026-02-19 03:02:04 -08:00

43 lines
784 B
Nix

{ config, pkgs, ... }:
{
services.restic.backups.orac = {
user = "root";
initialize = true;
passwordFile = "/etc/nixos/secrets/restic-auth";
repository = "s3:d8j2.or.idrivee2-38.com/backups";
environmentFile = "/etc/nixos/secrets/restic.env";
paths = [
"/home/"
"/root"
"/var/lib/"
"/var/log/"
"/etc/"
"/mnt/myjfs/"
];
exclude = [
"/mnt/*/.accesslog"
]
pruneOpts = [
"--keep-hourly 48"
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 12"
"--keep-yearly 5"
];
extraBackupArgs = [
"--verbose"
"--exclude-caches"
];
timerConfig = {
OnCalendar = "*:20";
Persistent = true;
RandomizedDelaySec = "10m";
};
};
}