logrotate for /var/log/caddy/access-beta.jakstys.lt.log

This commit is contained in:
Motiejus Jakštys 2023-01-17 14:07:05 +02:00
parent e3d98c6537
commit cee3366daa

View File

@ -246,6 +246,23 @@ let ssh_pubkeys = {
} }
''; '';
}; };
logrotate = {
settings = {
"/var/log/caddy/access-beta.jakstys.lt.log" = {
rotate = 60;
frequency = "daily";
dateext = true;
dateyesterday = true;
compress = true;
compresscmd = "${pkgs.zstd}/bin/zstd";
compressext = ".zst";
compressoptions = "--long -19";
uncompresscmd = "${pkgs.zstd}/bin/unzstd";
postrotate = "${pkgs.systemd}/bin/systemctl reload caddy";
};
};
};
}; };
networking = { networking = {