From 2616e00a5310e1755fdec02147f1110221fb6d36 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 27 Mar 2025 08:09:26 +0100 Subject: tweak(tente): rotate matrix nginx access logs daily --- nixos/hosts/tente/matrix.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos/hosts/tente/matrix.nix') diff --git a/nixos/hosts/tente/matrix.nix b/nixos/hosts/tente/matrix.nix index 3dc5ad0..cf0f09a 100644 --- a/nixos/hosts/tente/matrix.nix +++ b/nixos/hosts/tente/matrix.nix @@ -60,6 +60,16 @@ in # Forward requests for e.g. SSO and password-resets. locations."/_synapse/client".proxyPass = "http://127.0.0.1:${toString cfg.port}"; }; + + # I don't really care about these nginx access logs. Synapse has its own + # log anyway and with the default log rotation (weekly and delaycompress=true) + # the access logs from last week took up ~800MB. + logrotate.settings.matrix-nginx-access-log = + (helpers.mkNginxAccessLogrotateSettings cfg.apiDomain) + // { + frequency = "daily"; + rotate = 14; + }; }; }; } -- cgit v1.2.3