Merge pull request #95809 from aanderse/logrotate

nixos/logrotate: switch `paths` option type from listOf to attrsOf
This commit is contained in:
Aaron Andersen
2020-08-21 17:31:52 -04:00
committed by GitHub
2 changed files with 124 additions and 41 deletions
@@ -661,6 +661,25 @@ in
pkg
];
services.logrotate = optionalAttrs (cfg.logFormat != "none") {
enable = mkDefault true;
paths.httpd = {
path = "${cfg.logDir}/*.log";
user = cfg.user;
group = cfg.group;
frequency = "daily";
keep = 28;
extraConfig = ''
sharedscripts
compress
delaycompress
postrotate
systemctl reload httpd.service > /dev/null 2>/dev/null || true
endscript
'';
};
};
services.httpd.phpOptions =
''
; Needed for PHP's mail() function.