setup journald retention and rotation

This commit is contained in:
Noah Masur 2023-06-05 03:09:38 +00:00
parent 04e8b8834e
commit c1e89fb20e
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
imports = [ ./user.nix ./timezone.nix ./doas.nix ]; imports = [ ./doas.nix ./journald.nix ./user.nix ./timezone.nix ];
config = lib.mkIf pkgs.stdenv.isLinux { config = lib.mkIf pkgs.stdenv.isLinux {

View File

@ -0,0 +1,10 @@
{ ... }: {
# How long to keep journalctl entries
services.journald.extraConfig = ''
SystemMaxUse=100M
MaxFileSec=1month
MaxRetentionSec=2month
'';
}