snowflake/hosts/tsuki/services/restic.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

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;};
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";
2023-06-02 23:30:30 -04:00
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-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
};
};
};
};
}