2022-01-24 12:18:17 +01:00
|
|
|
{ username, ... }:
|
2021-11-28 12:00:58 +01:00
|
|
|
{
|
2021-12-31 10:32:47 +01:00
|
|
|
services.restic.backups.${username} = {
|
|
|
|
user = username;
|
2022-01-27 19:32:05 +01:00
|
|
|
repository = "rest:http://10.7.89.30:8000";
|
2021-11-28 12:00:58 +01:00
|
|
|
timerConfig.OnCalendar = "hourly";
|
2022-01-12 22:12:48 +01:00
|
|
|
passwordFile = "/home/${username}/.nixos/secrets/passwords/restic.key";
|
2021-12-31 10:32:47 +01:00
|
|
|
paths = [ "/home/${username}/" ];
|
2021-11-28 12:00:58 +01:00
|
|
|
extraBackupArgs = [
|
2022-01-12 22:12:48 +01:00
|
|
|
"--exclude-file=/home/${username}/.nixos/modules/restic/excludes.txt"
|
2021-11-28 12:00:58 +01:00
|
|
|
];
|
2022-01-29 15:26:42 +01:00
|
|
|
pruneOpts = [
|
|
|
|
"--keep-hourly 24"
|
|
|
|
"--keep-daily 7"
|
|
|
|
"--keep-weekly 5"
|
|
|
|
"--keep-monthly 12"
|
|
|
|
];
|
2021-11-28 12:00:58 +01:00
|
|
|
};
|
|
|
|
}
|