Rotate logs using logrotate

This commit is contained in:
coolneng 2022-06-15 22:49:31 +02:00
parent 2ad60ca2e4
commit e6d7d0681a
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 9 additions and 1 deletions

View File

@ -133,7 +133,15 @@ with pkgs;
}; };
# Rotate logs after 7 days # Rotate logs after 7 days
services.journald.extraConfig = "SystemMaxFiles=7"; services.logrotate = {
enable = true;
settings = {
"/var/log/journal" = {
frequency = "weekly";
rotate = 7;
};
};
};
# Increase inotify limits # Increase inotify limits
boot.kernel.sysctl = { "fs.inotify.max_user_watches" = 204800; }; boot.kernel.sysctl = { "fs.inotify.max_user_watches" = 204800; };