From d9b3adca756bdc10c298439f4502626bbcefcc2a Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Sat, 4 Dec 2021 20:46:29 +0800 Subject: [PATCH] launchd: Set NumberOfFiles to 4096 The default maxfiles on macOS 11 and macOS 12 is 256, which is too low for nix to work: ``` $ launchctl limit maxfiles maxfiles 256 unlimited ``` Set NumberOfFiles of nix-daemon to 4096 to avoid `Too many open files` error. --- misc/launchd/org.nixos.nix-daemon.plist.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/launchd/org.nixos.nix-daemon.plist.in b/misc/launchd/org.nixos.nix-daemon.plist.in index f1b439840..da1970f69 100644 --- a/misc/launchd/org.nixos.nix-daemon.plist.in +++ b/misc/launchd/org.nixos.nix-daemon.plist.in @@ -25,5 +25,10 @@ /var/log/nix-daemon.log StandardOutPath /dev/null + SoftResourceLimits + + NumberOfFiles + 4096 +