~kaction/config

8084b99a037acff27fda6df77174f7fa8ca69e49 — Dmitry Bogatov 2 years ago be1a4e3
nix-sys/nix-daemon: increase file descriptor limit

Without this change, building of huge latex derivation resulted "too
much open files" error.
1 files changed, 5 insertions(+), 1 deletions(-)

M system-v2/nix-daemon/runit.nix
M system-v2/nix-daemon/runit.nix => system-v2/nix-daemon/runit.nix +5 -1
@@ 1,9 1,13 @@
{ runCommand, writeScript, execline, cacert, nix }:
{ runCommand, writeScript, runit, execline, cacert, nix }:
let
  # Increase limit of open files. Default soft/hard limit of 1024/4096
  # is not enough for really huge derivations, like one built in
  # tutor-papers.
  runscript = writeScript "nix-daemon.run" ''
    #!${execline}/bin/execlineb -P
    export SSL_CERT_FILE     ${cacert}/etc/ssl/certs/ca-bundle.crt
    export NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt
    ${runit}/bin/chpst -o 16000
    ${nix}/bin/nix-daemon
  '';
in runCommand "nix-daemon.sv" { inherit runscript; } ''