nixos/zfs: make it easier to override Persistent setting of timers

This commit is contained in:
Stefan Frijters 2025-02-22 12:55:04 +01:00
parent 648a374b8b
commit 45dad721eb
No known key found for this signature in database
GPG key ID: 7619A6BC6E7DFA6F

View file

@ -877,7 +877,7 @@ in
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnCalendar = timer snapName; OnCalendar = timer snapName;
Persistent = "yes"; Persistent = lib.mkDefault "yes";
}; };
}; };
}) snapshotNames); }) snapshotNames);
@ -907,7 +907,7 @@ in
after = [ "multi-user.target" ]; # Apparently scrubbing before boot is complete hangs the system? #53583 after = [ "multi-user.target" ]; # Apparently scrubbing before boot is complete hangs the system? #53583
timerConfig = { timerConfig = {
OnCalendar = cfgScrub.interval; OnCalendar = cfgScrub.interval;
Persistent = "yes"; Persistent = lib.mkDefault "yes";
RandomizedDelaySec = cfgScrub.randomizedDelaySec; RandomizedDelaySec = cfgScrub.randomizedDelaySec;
}; };
}; };
@ -927,7 +927,7 @@ in
}; };
systemd.timers.zpool-trim.timerConfig = { systemd.timers.zpool-trim.timerConfig = {
Persistent = "yes"; Persistent = lib.mkDefault "yes";
RandomizedDelaySec = cfgTrim.randomizedDelaySec; RandomizedDelaySec = cfgTrim.randomizedDelaySec;
}; };
}) })