diff options
author | grm@eyesin.space <grm@eyesin.space> | 2025-09-02 23:04:24 +0000 |
---|---|---|
committer | grm@eyesin.space <grm@eyesin.space> | 2025-09-02 23:04:24 +0000 |
commit | 47ef05ab310bb466300e93d1459370450414fbc4 (patch) | |
tree | 808f155d2871f831af743509de982c4c9789357c /nixos/restic.nix | |
download | nixos-config-master.tar.gz nixos-config-master.tar.bz2 nixos-config-master.zip |
Diffstat (limited to 'nixos/restic.nix')
-rw-r--r-- | nixos/restic.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/restic.nix b/nixos/restic.nix new file mode 100644 index 0000000..46f0631 --- /dev/null +++ b/nixos/restic.nix @@ -0,0 +1,31 @@ +{ + services.restic.backups = { + periodic = { + initialize = true; + environmentFile = "/root/.config/restic/env"; + repositoryFile = "/root/.config/restic/repository"; + passwordFile = "/root/.config/restic/password"; + + timerConfig = { + OnCalendar = "0/4:00"; + }; + + exclude = [ + "lost+found" + ]; + + paths = [ + "/home" + "/root" + ]; + + pruneOpts = [ + "--keep-hourly 6" + "--keep-daily 7" + "--keep-weekly 2" + "--keep-monthly 12" + "--keep-yearly 1" + ]; + }; + }; +} |