nixos/xserver: set fs.inotify.max_user_instances too

A too low number of inotify user instances causes similar problems as
max_user_watches. Without this, my workstation keeps running into things
like this:

$ sudo systemctl restart display-manager.service
Failed to allocate directory watch: Too many open files
This commit is contained in:
Florian Klink 2021-04-21 13:45:13 +02:00
parent b3abdc9534
commit 7ff18cdf3c

View File

@ -666,6 +666,7 @@ in
# The default max inotify watches is 8192.
# Nowadays most apps require a good number of inotify watches,
# the value below is used by default on several other distros.
boot.kernel.sysctl."fs.inotify.max_user_instances" = mkDefault 524288;
boot.kernel.sysctl."fs.inotify.max_user_watches" = mkDefault 524288;
systemd.defaultUnit = mkIf cfg.autorun "graphical.target";