From 9b9396bda156d66aa13460ee5b9663215e8948a9 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sun, 17 Sep 2023 15:34:06 +0200 Subject: [PATCH] journald config --- modules/base.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/base.nix b/modules/base.nix index 386571c..05994b0 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -65,6 +65,14 @@ environment.systemPackages = with pkgs; [ ]; + # SystemMaxFileSize: Defaults to one eighth of the values configured with SystemMaxUse= and RuntimeMaxUse=, so that usually seven rotated journal files are kept as history. + # MaxFileSec: To ensure that not too much data is lost at once when old journal files are deleted, it might make sense to change this value from the default of one month. + # https://www.freedesktop.org/software/systemd/man/journald.conf.html + services.journald.extraConfig = '' + SystemMaxUse=800M + MaxFileSec=7day + ''; + # BTRFS compression. # # `nixos-generate-config` does not detect mount options, so we add them here.