git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #136630 from mweinelt/logrotate-hourly

nixos/logrotate: allow hourly frequency

commitf366af7a1b3891d9370091ab03150d3a6ee138fa authorAaron Andersen <aaron@fosslib.net> dateMon 29 Nov 2021, 07:42 (5 years ago) parentb36017627b5710
1 file changed+2−2
nixos/modules/services/logging/logrotate.nix+2−2
nixos/modules/services/logging/logrotate.nix+2−2
@@ -40,7 +40,7 @@ let
4040 };
4141
4242 frequency = mkOption {
43− type = types.enum [ "daily" "weekly" "monthly" "yearly" ];
43+ type = types.enum [ "hourly" "daily" "weekly" "monthly" "yearly" ];
4444 default = "daily";
4545 description = ''
4646 How often to rotate the logs.
@@ -155,7 +155,7 @@ in
155155 systemd.services.logrotate = {
156156 description = "Logrotate Service";
157157 wantedBy = [ "multi-user.target" ];
158− startAt = "*-*-* *:05:00";
158+ startAt = "hourly";
159159 script = ''
160160 exec ${pkgs.logrotate}/sbin/logrotate ${configFile}
161161 '';