From 27b571067e51450d14387671d20f52b7ec237b22 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Sep 2021 23:17:28 +0200 Subject: nixos/logrotate: allow hourly frequency Also adjust the timer to run with the hourly keyword. --- nixos/modules/services/logging/logrotate.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix index 7d6102b82557..072c5ae71ec2 100644 --- a/nixos/modules/services/logging/logrotate.nix +++ b/nixos/modules/services/logging/logrotate.nix @@ -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} ''; -- cgit 1.4.1