From dc2f3812b41f825ed466c24c4211160d75cb890c Mon Sep 17 00:00:00 2001 From: Sofie Date: Fri, 15 Mar 2024 13:36:03 +0100 Subject: [PATCH] nix-gc: add daily frequency option The systemd.time documentation defines the shorthands `daily` and `minutely` which are currently not included in the nix-gc module. This commit adds the `daily` option, but omits `minutely` since it's not a timescale that would make sense to run a gc for. https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html --- modules/services/nix-gc.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/services/nix-gc.nix b/modules/services/nix-gc.nix index 01fe5ac5d..6c837330e 100644 --- a/modules/services/nix-gc.nix +++ b/modules/services/nix-gc.nix @@ -9,6 +9,10 @@ let let freq = { "hourly" = [{ Minute = 0; }]; + "daily" = [{ + Hour = 0; + Minute = 0; + }]; "weekly" = [{ Weekday = 1; Hour = 0; @@ -62,8 +66,14 @@ in { }; frequency = mkOption { - type = - types.enum [ "hourly" "weekly" "monthly" "semiannually" "annually" ]; + type = types.enum [ + "hourly" + "daily" + "weekly" + "monthly" + "semiannually" + "annually" + ]; default = "weekly"; example = "monthly"; description = ''