Rotate logs using logrotate
This commit is contained in:
parent
2ad60ca2e4
commit
e6d7d0681a
|
@ -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; };
|
||||||
|
|
Loading…
Reference in New Issue