nixos-config/hosts/falkenstein/modules/logging/default.nix

30 lines
543 B
Nix
Raw Normal View History

2024-03-23 00:32:12 +01:00
{ pkgs, ... }:
{
services.rsyslogd = {
enable = true;
defaultConfig = ''
:programname, isequal, "postfix" /var/log/postfix.log
auth.* -/var/log/auth.log
'';
};
services.logrotate.configFile = pkgs.writeText "logrotate.conf" ''
weekly
missingok
notifempty
rotate 4
"/var/log/postfix.log" {
compress
delaycompress
weekly
rotate 156
}
2024-05-23 15:44:49 +02:00
"/var/log/caddy/*.log" {
2024-03-23 00:32:12 +01:00
compress
delaycompress
weekly
rotate 26
}
'';
}