2023-06-02 23:30:30 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2023-12-31 12:51:49 -05:00
|
|
|
sops.secrets.restic-tsuki = {sopsFile = ../../../secrets/restic/secrets.yaml;};
|
2024-02-05 10:06:22 -05:00
|
|
|
sops.secrets.restic-osu = {sopsFile = ../../../secrets/restic/secrets.yaml;};
|
2023-06-02 23:30:30 -04:00
|
|
|
environment.systemPackages = [pkgs.restic];
|
|
|
|
services.restic = {
|
|
|
|
backups = {
|
|
|
|
tsuki = {
|
2024-01-01 16:14:33 -05:00
|
|
|
user = "root";
|
2024-02-05 10:06:22 -05:00
|
|
|
paths = ["/home"];
|
2023-06-02 23:30:30 -04:00
|
|
|
exclude = [
|
2023-06-06 00:08:55 -04:00
|
|
|
"*.qcow2"
|
|
|
|
"*.iso"
|
2023-06-02 23:30:30 -04:00
|
|
|
"/home/*/Downloads"
|
|
|
|
"/home/*/Games"
|
|
|
|
"/home/*/Videos"
|
2023-09-19 12:07:43 -04:00
|
|
|
"/home/*/osu!"
|
2023-06-02 23:30:30 -04:00
|
|
|
"/home/*/.cache"
|
|
|
|
"/home/*/.wine"
|
|
|
|
"/home/*/.rustup"
|
|
|
|
"/home/*/.cargo"
|
2023-06-06 00:08:55 -04:00
|
|
|
"/home/*/.factorio"
|
|
|
|
"/home/*/.mplayer"
|
|
|
|
"/home/*/.steam"
|
2023-12-30 20:47:47 -05:00
|
|
|
"/home/*/.eclipse"
|
|
|
|
"/home/*/.bundle"
|
2023-06-02 23:30:30 -04:00
|
|
|
"/home/*/.local/share/Trash"
|
|
|
|
"/home/*/.local/share/Steam"
|
|
|
|
"/home/*/.local/share/.var"
|
|
|
|
];
|
|
|
|
pruneOpts = [
|
2023-12-31 12:51:49 -05:00
|
|
|
"--keep-daily=7"
|
2023-06-06 00:08:55 -04:00
|
|
|
"--keep-weekly=6"
|
|
|
|
"--keep-monthly=5"
|
2023-06-02 23:30:30 -04:00
|
|
|
];
|
|
|
|
initialize = true;
|
2023-12-31 13:02:54 -05:00
|
|
|
repository = "/nas/restic";
|
2023-12-31 12:51:49 -05:00
|
|
|
passwordFile = config.sops.secrets.restic-tsuki.path;
|
2023-06-02 23:30:30 -04:00
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
2023-12-30 20:47:47 -05:00
|
|
|
RandomizedDelaySec = "10m";
|
|
|
|
Persistent = true;
|
2023-06-02 23:30:30 -04:00
|
|
|
};
|
|
|
|
};
|
2024-02-05 10:06:22 -05:00
|
|
|
osu = {
|
|
|
|
user = "root";
|
|
|
|
paths = ["/home/*/osu!"];
|
|
|
|
pruneOpts = ["--keep-last=2"];
|
|
|
|
initialize = true;
|
|
|
|
repository = "/nas/osu-backups";
|
|
|
|
passwordFile = config.sops.secrets.restic-osu.path;
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "weekly";
|
|
|
|
RandomizedDelaySec = "30m";
|
|
|
|
Persistent = true;
|
|
|
|
};
|
|
|
|
};
|
2023-06-02 23:30:30 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|