From: Scott Worley Date: Thu, 17 Nov 2022 14:02:38 +0000 (-0800) Subject: profile-gc: Use OnUnitActiveSec so timer recurs X-Git-Url: http://git.scottworley.com/nix-profile-gc/commitdiff_plain/10533fbd6bdf5046f36e41c7848dbc6a324eb4cd?hp=0029e3b37f72087a2ad1f731c3eebe490e139d6e profile-gc: Use OnUnitActiveSec so timer recurs --- diff --git a/modules/profile-gc.nix b/modules/profile-gc.nix index 488bc0a..8e69301 100644 --- a/modules/profile-gc.nix +++ b/modules/profile-gc.nix @@ -50,7 +50,7 @@ in { keepLast won't protect them) while trying to get up to date. This is approximate and has a useful granularity of an hour - (config.systemd.timers.profile-gc-log-active.timerConfig.OnActiveSec). + (config.systemd.timers.profile-gc-log-active.timerConfig.OnUnitActiveSec). Do not set less than this. ''; # We admonish the user "Do not set less than this." and check it at runtime rather @@ -98,7 +98,7 @@ in { fi alive_threshold="$(< ${parse-duration cfg.activeThreshold})" - alive_loginterval="$(< ${parse-duration config.systemd.timers.profile-gc-log-active.timerConfig.OnActiveSec})" + alive_loginterval="$(< ${parse-duration config.systemd.timers.profile-gc-log-active.timerConfig.OnUnitActiveSec})" if (( alive_threshold < alive_loginterval ));then echo "Liveness threshold is too low. Not doing any profile garbage collection." >&2 exit 0 @@ -190,7 +190,7 @@ in { ''; systemd.timers.profile-gc-log-active = { wantedBy = [ "timers.target" ]; - timerConfig.OnActiveSec = "1 hour"; + timerConfig.OnUnitActiveSec = "1 hour"; }; systemd.services.profile-gc-log-active = { description =