diff options
author | Zhong Jianxin <azuwis@gmail.com> | 2021-12-04 20:46:29 +0800 |
---|---|---|
committer | Zhong Jianxin <azuwis@gmail.com> | 2021-12-04 20:46:29 +0800 |
commit | d9b3adca756bdc10c298439f4502626bbcefcc2a (patch) | |
tree | 92635f2ba55031434a83be5f198713c16bab083d /misc | |
parent | 2e606e87c44a8dc42664f8938eac1d4b63047dd6 (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.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/launchd/org.nixos.nix-daemon.plist.in | 5 |
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> |