aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhong Jianxin <azuwis@gmail.com>2021-12-04 20:46:29 +0800
committerZhong Jianxin <azuwis@gmail.com>2021-12-04 20:46:29 +0800
commitd9b3adca756bdc10c298439f4502626bbcefcc2a (patch)
tree92635f2ba55031434a83be5f198713c16bab083d
parent2e606e87c44a8dc42664f8938eac1d4b63047dd6 (diff)
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.
-rw-r--r--misc/launchd/org.nixos.nix-daemon.plist.in5
1 files changed, 5 insertions, 0 deletions
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 @@
<string>/var/log/nix-daemon.log</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
+ <key>SoftResourceLimits</key>
+ <dict>
+ <key>NumberOfFiles</key>
+ <integer>4096</integer>
+ </dict>
</dict>
</plist>