nixos/logrotate: allow hourly frequency

Also adjust the timer to run with the hourly keyword.
This commit is contained in:
Martin Weinelt 2021-09-03 23:17:28 +02:00
parent 651d7cdc19
commit 27b571067e
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

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}
'';