snowflake/hosts/tsuki/services/restic.nix
notohh 5e32a0d063
Some checks failed
flake check / check (push) Successful in 10m19s
fmt check / check (push) Failing after 54s
tsuki: update restic mounting
2023-12-31 13:02:54 -05:00

52 lines
1.2 KiB
Nix

{
pkgs,
config,
...
}: {
sops.secrets.restic-tsuki = {sopsFile = ../../../secrets/restic/secrets.yaml;};
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/*/.eclipse"
"/home/*/.bundle"
"/home/*/.local/share/Trash"
"/home/*/.local/share/Steam"
"/home/*/.local/share/.var"
];
pruneOpts = [
"--keep-daily=7"
"--keep-weekly=6"
"--keep-monthly=5"
];
initialize = true;
repository = "/nas/restic";
passwordFile = config.sops.secrets.restic-tsuki.path;
timerConfig = {
OnCalendar = "daily";
RandomizedDelaySec = "10m";
Persistent = true;
};
};
};
};
}