2024-03-19 09:49:43 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-03-21 15:59:10 -05:00
|
|
|
mkOizysModule,
|
2024-03-19 09:49:43 -05:00
|
|
|
...
|
2024-03-21 15:59:10 -05:00
|
|
|
}:
|
|
|
|
mkOizysModule config "backups" {
|
2024-05-06 14:32:00 -05:00
|
|
|
environment.systemPackages = with pkgs; [ rclone ];
|
2024-03-19 08:56:51 -05:00
|
|
|
|
2024-03-21 15:59:10 -05:00
|
|
|
services.restic.backups.gdrive = {
|
|
|
|
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
|
|
|
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
2024-03-19 09:49:43 -05:00
|
|
|
|
2024-03-21 15:59:10 -05:00
|
|
|
extraBackupArgs = [
|
2024-08-02 10:10:11 -05:00
|
|
|
"--exclude-file /home/${config.oizys.user}/.config/restic/excludes.txt"
|
|
|
|
"--exclude-file /home/${config.oizys.user}/.conda/environments.txt"
|
2024-03-21 15:59:10 -05:00
|
|
|
"--verbose"
|
|
|
|
"--one-file-system"
|
|
|
|
"--tag systemd.timer"
|
|
|
|
];
|
|
|
|
pruneOpts = [
|
|
|
|
"--verbose"
|
|
|
|
"--tag systemd.timer"
|
|
|
|
"--keep-daily 7"
|
|
|
|
"--keep-weekly 4"
|
|
|
|
"--keep-monthly 12"
|
|
|
|
"--keep-yearly 3"
|
|
|
|
];
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "00:05";
|
|
|
|
Persistent = true;
|
|
|
|
RandomizedDelaySec = "5h";
|
2024-01-23 11:51:13 -06:00
|
|
|
};
|
2024-03-21 15:59:10 -05:00
|
|
|
};
|
|
|
|
}
|