summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2024-04-03 16:58:29 +0200
committerAlan Pearce2024-04-03 16:58:29 +0200
commitba2af712994a709ddb10f789736fce9fda99cc44 (patch)
tree9cba51eb15aed47f4633aeb19b54107cd1d9dfef /system
parent653f1400f9741808efb899608a8a726c5e0c29c6 (diff)
downloadnixfiles-ba2af712994a709ddb10f789736fce9fda99cc44.tar.lz
nixfiles-ba2af712994a709ddb10f789736fce9fda99cc44.tar.zst
nixfiles-ba2af712994a709ddb10f789736fce9fda99cc44.zip
darwin: increase max open files
Diffstat (limited to 'system')
-rw-r--r--system/settings/darwin.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/system/settings/darwin.nix b/system/settings/darwin.nix
index b1c6aad3..806fdeb9 100644
--- a/system/settings/darwin.nix
+++ b/system/settings/darwin.nix
@@ -29,6 +29,32 @@
     allowUnfree = true;
   };
 
+  environment.launchDaemons = {
+    "limit.maxfiles.plist" = {
+      text = ''
+        <?xml version="1.0" encoding="UTF-8"?>
+        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
+                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+        <plist version="1.0">
+          <dict>
+            <key>Label</key>
+            <string>limit.maxfiles</string>
+            <key>ProgramArguments</key>
+            <array>
+              <string>launchctl</string>
+              <string>limit</string>
+              <string>maxfiles</string>
+              <string>64000</string>
+              <string>524288</string>
+            </array>
+            <key>RunAtLoad</key>
+            <true/>
+          </dict>
+        </plist>
+      '';
+    };
+  };
+
   environment.systemPackages = with pkgs; [
     watch
     coreutils-prefixed