2024-03-19 09:49:43 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2024-03-21 10:53:27 -05:00
|
|
|
inherit (lib) mkOizysModule;
|
2024-03-21 11:04:01 -05:00
|
|
|
in
|
2024-03-21 10:53:27 -05:00
|
|
|
mkOizysModule config "backups" {
|
2024-03-19 09:49:43 -05:00
|
|
|
environment.systemPackages = with pkgs; [rclone];
|
2024-03-19 08:56:51 -05:00
|
|
|
|
2024-03-19 09:49:43 -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`
|
|
|
|
|
|
|
|
extraBackupArgs = [
|
|
|
|
"--exclude-file /home/daylin/.config/restic/excludes.txt"
|
|
|
|
"--exclude-file /home/daylin/.conda/environments.txt"
|
|
|
|
"--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 10:53:27 -05:00
|
|
|
}
|