snowflake/hosts/tsuki/services/restic.nix
notohh 8ede20a5f2
All checks were successful
fmt check / check (push) Successful in 48s
flake check / check (push) Successful in 3m53s
restic: ignore mounted dirs
2023-10-22 19:58:11 -04:00

49 lines
1.1 KiB
Nix

{
pkgs,
config,
...
}: {
sops.secrets.restic-repo-pwd = {};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
tsuki = {
paths = [
"/home"
];
exclude = [
"*.qcow2"
"*.iso"
"/home/*/Downloads"
"/home/*/Games"
"/home/*/Videos"
"/home/*/osu!"
"/home/*/mounted"
"/home/*/cryptomator/mounted"
"/home/*/.cache"
"/home/*/.wine"
"/home/*/.rustup"
"/home/*/.cargo"
"/home/*/.factorio"
"/home/*/.mplayer"
"/home/*/.steam"
"/home/*/.local/share/Trash"
"/home/*/.local/share/Steam"
"/home/*/.local/share/.var"
];
pruneOpts = [
"--keep-daily=8"
"--keep-weekly=6"
"--keep-monthly=5"
];
initialize = true;
repository = "/nas/home";
passwordFile = config.sops.secrets.restic-repo-pwd.path;
timerConfig = {
OnCalendar = "daily";
};
};
};
};
}