about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJure Varlec <jure@varlec.si>2023-04-30 16:13:23 +0200
committerJure Varlec <jure@varlec.si>2023-04-30 17:36:49 +0200
commit44438e0dcdf800809e1bf1bed78dea90bb35037a (patch)
tree815a65c9fc3633000ec22eccc668b6e1876dff0c /nixos
parent821f72ac3e343fadc3964c48b589643996193b6a (diff)
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.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/fstrim.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/fstrim.nix b/nixos/modules/services/misc/fstrim.nix
index 36b5f9c8cca13..55fb24e292723 100644
--- a/nixos/modules/services/misc/fstrim.nix
+++ b/nixos/modules/services/misc/fstrim.nix
@@ -34,7 +34,7 @@ in {
 
     systemd.timers.fstrim = {
       timerConfig = {
-        OnCalendar = cfg.interval;
+        OnCalendar = [ "" cfg.interval ];
       };
       wantedBy = [ "timers.target" ];
     };