all repos — nixfiles @ ba2af712994a709ddb10f789736fce9fda99cc44

System and user configuration, managed by nix and home-manager

darwin: increase max open files
Alan Pearce alan@alanpearce.eu
Wed, 03 Apr 2024 16:58:29 +0200
commit

ba2af712994a709ddb10f789736fce9fda99cc44

parent

653f1400f9741808efb899608a8a726c5e0c29c6

1 files changed, 26 insertions(+), 0 deletions(-)

jump to
M system/settings/darwin.nixsystem/settings/darwin.nix
@@ -29,6 +29,32 @@ nixpkgs.config = {     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