diff --git a/configuration.nix b/configuration.nix index f0a51e9..38ea467 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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 = {