mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
25 lines
523 B
Nix
25 lines
523 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;
|
|
};
|
|
asterisk = mkIf config.systemd.services.asterisk.enable {
|
|
path = "/var/log/asterisk/messages";
|
|
user = "asterisk";
|
|
group = "asterisk";
|
|
frequency = "daily";
|
|
keep = 2;
|
|
};
|
|
};
|
|
};
|
|
}
|