From bcce239a93630ed6081b44d356a2bf0b67029919 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 15 Jun 2022 22:49:08 +0200 Subject: [PATCH] Rotate logs using logrotate --- configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index db9e2b2..953d548 100644 --- a/configuration.nix +++ b/configuration.nix @@ -69,7 +69,15 @@ in { boot.cleanTmpDir = true; # Rotate logs after 7 days - services.journald.extraConfig = "SystemMaxFiles=7"; + services.logrotate = { + enable = true; + settings = { + "/var/log/journal" = { + frequency = "weekly"; + rotate = 7; + }; + }; + }; # Allow propietary software and build packages with Pulseaudio support nixpkgs.config = {