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.
This commit is contained in:
Jure Varlec 2023-04-30 16:13:23 +02:00
parent 821f72ac3e
commit 44438e0dcd

View file

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