2023-06-02 23:30:30 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
sops.secrets.restic-repo-pwd = {};
|
|
|
|
environment.systemPackages = [pkgs.restic];
|
|
|
|
services.restic = {
|
|
|
|
backups = {
|
|
|
|
tsuki = {
|
|
|
|
paths = [
|
|
|
|
"/home"
|
|
|
|
];
|
|
|
|
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-10-22 19:58:11 -04:00
|
|
|
"/home/*/mounted"
|
|
|
|
"/home/*/cryptomator/mounted"
|
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-06-06 00:08:55 -04:00
|
|
|
"--keep-daily=8"
|
|
|
|
"--keep-weekly=6"
|
|
|
|
"--keep-monthly=5"
|
2023-06-02 23:30:30 -04:00
|
|
|
];
|
|
|
|
initialize = true;
|
|
|
|
repository = "/nas/home";
|
|
|
|
passwordFile = config.sops.secrets.restic-repo-pwd.path;
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
2023-12-30 20:47:47 -05:00
|
|
|
RandomizedDelaySec = "10m";
|
|
|
|
Persistent = true;
|
2023-06-02 23:30:30 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|