nixos/pretix: enable log rotation

This limits the amount of logs we store by default to 3 months.
This commit is contained in:
Martin Weinelt 2024-09-23 16:53:59 +02:00
parent 64a773b7e4
commit 9a85a7e2ce
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -403,6 +403,15 @@ in
'')
];
services.logrotate.settings.pretix = {
files = "${cfg.settings.pretix.logdir}/*.log";
su = "${cfg.user} ${cfg.group}";
frequency = "weekly";
rotate = "12";
copytruncate = true;
compress = true;
};
services = {
nginx = mkIf cfg.nginx.enable {
enable = true;