Only keep 7 days of logs

This commit is contained in:
Nathan McCarty 2023-06-19 02:43:14 -04:00
parent 249aa0a4bf
commit ef29560c7c
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 11 additions and 0 deletions

View File

@ -72,5 +72,11 @@ with lib; {
services.iperf3.enable = true;
environment.systemPackages = with pkgs; [ iperf ];
}
# Don't store logs longer than 7 days
{
services.journald.extraConfig = ''
MaxRetentionSec=7day
'';
}
];
}

View File

@ -14,6 +14,11 @@ in with lib; {
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
# Only keep 7 days of logs
services.logrotate.settings.nginx = {
rotate = 7;
frequency = "daily";
};
})
(mkIf nathan.services.nginx.acme {
security.acme = {