From 64ee1c8d3477092aa5daa36098dc1fa821b84c2f Mon Sep 17 00:00:00 2001 From: Peter Lehmann Date: Fri, 21 Jun 2024 21:05:14 +0200 Subject: [PATCH] heptifili: Setup zfs maintainance --- nodes/heptifili/modules/zfs.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nodes/heptifili/modules/zfs.nix b/nodes/heptifili/modules/zfs.nix index bb2f08f..49947c6 100644 --- a/nodes/heptifili/modules/zfs.nix +++ b/nodes/heptifili/modules/zfs.nix @@ -12,4 +12,24 @@ extraPools = [ "data" ]; }; }; + + services.zfs = { + autoScrub = { + enable = true; + interval = "monthly"; + pools = [ ]; # Empty List scrubs all mounted pools + }; + autoSnapshot = { + enable = true; + flags = "-k -p -u"; + frequent = 4; + hourly = 24; + daily = 7; + monthly = 12; + }; + trim = { + enable = true; + interval = "weekly"; + }; + }; }