diff --git a/modules/datasync.nix b/modules/datasync.nix index 688e8d3..d2a66f1 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -77,4 +77,33 @@ ''; }; + # ZFS automatic snapshotting + services.znapzend = { + enable = true; + autoCreation = true; + features = { + compressed = true; + recvu = true; + }; + zetup = { + "vault/backups" = { + plan = "1day=>1hour,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + + "vault/syncthing" = { + plan = "1hour=>15min,1day=>15min,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + + "vault/git" = { + plan = "1hour=>15min,1day=>1hour,1month=>1day,1year=>1month"; + recursive = true; + mbuffer.enable = true; + }; + }; + }; + }