summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/syslog.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/syslog.nix b/modules/syslog.nix
index 13783eb..f42c237 100644
--- a/modules/syslog.nix
+++ b/modules/syslog.nix
@@ -14,6 +14,30 @@ in
};
services.logrotate = {
enable = true;
+ settings = {
+ header = {
+ create = "0640 root adm";
+ missingok = true;
+ notifempty = true;
+ frequency = "weekly";
+ rotate = 4;
+ compress = true;
+ delaycompress = true;
+ minsize = "1M";
+ };
+ "rsyslogd" = {
+ files = [
+ "/var/log/syslog"
+ "/var/log/mail.log"
+ "/var/log/kern.log"
+ "/var/log/auth.log"
+ "/var/log/user.log"
+ "/var/log/cron.log"
+ ];
+ sharedscripts = true;
+ postrotate = "systemctl kill -s HUP syslog.service";
+ };
+ };
};
};
}