From 17d287afa51324d97840b90bc7f9a1ab6c72a4bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Sep 2009 15:27:52 +0000 Subject: [PATCH] * Bump the number of maximum open files for Nix builders. Our VM builds were causing Samba to go over this limit. svn path=/nixos/trunk/; revision=16960 --- modules/services/misc/nix-daemon.nix | 5 +++++ modules/system/upstart/upstart.nix | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 3e435348f9d..ca18a8ad5b4 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -230,6 +230,11 @@ in ${config.nix.envVars} exec nice -n ${builtins.toString config.nix.daemonNiceLevel} ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 ''; + + extraConfig = + '' + limit nofile 4096 4096 + ''; }; environment.shellInit = diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index 7c9253b23f0..cdf96d7cb79 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -60,6 +60,8 @@ let ${job.postStop} end script '' else ""} + + ${job.extraConfig} ''; in @@ -238,6 +240,15 @@ in ''; }; + extraConfig = mkOption { + type = types.string; + default = ""; + example = "limit nofile 4096 4096"; + description = '' + Additional Upstart stanzas not otherwise supported. + ''; + }; + }; };