infrastructure/config/services/logrotate/default.nix
2021-08-06 23:11:46 +01:00

18 lines
303 B
Nix

{ config, lib, ... }:
with lib;
{
services.logrotate = {
enable = true;
paths = {
nginx = mkIf config.services.nginx.enable {
path = "/var/log/nginx/*.log";
user = "nginx";
group = "nginx";
frequency = "weekly";
keep = 2;
};
};
};
}