nixos/fstrim: fix overriding the timer interval

The OnCalendar systemd setting is additive. To clear the setting defined
by the pre-existing unit file, it has to be set first to an empty
string, then to the desired value.

(cherry picked from commit 44438e0dcd)
This commit is contained in:
Jure Varlec
2023-04-30 16:13:23 +02:00
committed by github-actions[bot]
parent d529862de0
commit f5bf638e5f

View File

@@ -34,7 +34,7 @@ in {
systemd.timers.fstrim = {
timerConfig = {
OnCalendar = cfg.interval;
OnCalendar = [ "" cfg.interval ];
};
wantedBy = [ "timers.target" ];
};