Merge pull request #136630 from mweinelt/logrotate-hourly

nixos/logrotate: allow hourly frequency
This commit is contained in:
Aaron Andersen 2021-11-29 07:42:14 -05:00 committed by GitHub
commit f366af7a1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ let
};
frequency = mkOption {
type = types.enum [ "daily" "weekly" "monthly" "yearly" ];
type = types.enum [ "hourly" "daily" "weekly" "monthly" "yearly" ];
default = "daily";
description = ''
How often to rotate the logs.
@ -155,7 +155,7 @@ in
systemd.services.logrotate = {
description = "Logrotate Service";
wantedBy = [ "multi-user.target" ];
startAt = "*-*-* *:05:00";
startAt = "hourly";
script = ''
exec ${pkgs.logrotate}/sbin/logrotate ${configFile}
'';