From da7748a6fc47e9efec56470ec01f9a137c14816f Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Fri, 12 Jun 2015 13:02:06 +0200 Subject: [PATCH] nixos: set high fs.inotify.max_user_watches when xserver is enabled --- nixos/modules/services/x11/xserver.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 5198864ef6ef..9fddc6a72104 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -469,6 +469,11 @@ in environment.pathsToLink = [ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ]; + # 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_watches" = mkDefault 524288; + systemd.defaultUnit = mkIf cfg.autorun "graphical.target"; systemd.services.display-manager =