aboutsummaryrefslogtreecommitdiffstats
path: root/nixos/restic.nix
diff options
context:
space:
mode:
authorgrm@eyesin.space <grm@eyesin.space>2025-09-02 23:04:24 +0000
committergrm@eyesin.space <grm@eyesin.space>2025-09-02 23:04:24 +0000
commit47ef05ab310bb466300e93d1459370450414fbc4 (patch)
tree808f155d2871f831af743509de982c4c9789357c /nixos/restic.nix
downloadnixos-config-master.tar.gz
nixos-config-master.tar.bz2
nixos-config-master.zip
Diffstat (limited to 'nixos/restic.nix')
-rw-r--r--nixos/restic.nix31
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"
+ ];
+ };
+ };
+}