Merge pull request #2750 from nh2/max-jobs-0-docs

docs: Mention `--max-jobs 0` to build remotely only
This commit is contained in:
Domen Kožar 2019-04-29 12:44:54 +07:00 committed by GitHub
commit 83f2b110ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -184,4 +184,7 @@ to be included. (This is the default.)</para>
the option <link linkend='conf-builders-use-substitutes'><literal>builders-use-substitutes</literal></link> the option <link linkend='conf-builders-use-substitutes'><literal>builders-use-substitutes</literal></link>
in your local <filename>nix.conf</filename>.</para> in your local <filename>nix.conf</filename>.</para>
<para>To build only on remote builders and disable building on the local machine,
you can use the option <option>--max-jobs 0</option>.</para>
</chapter> </chapter>

View file

@ -107,14 +107,22 @@
<varlistentry xml:id="opt-max-jobs"><term><option>--max-jobs</option> / <option>-j</option> <varlistentry xml:id="opt-max-jobs"><term><option>--max-jobs</option> / <option>-j</option>
<replaceable>number</replaceable></term> <replaceable>number</replaceable></term>
<listitem><para>Sets the maximum number of build jobs that Nix will <listitem>
<para>Sets the maximum number of build jobs that Nix will
perform in parallel to the specified number. Specify perform in parallel to the specified number. Specify
<literal>auto</literal> to use the number of CPUs in the system. <literal>auto</literal> to use the number of CPUs in the system.
The default is specified by the <link The default is specified by the <link
linkend='conf-max-jobs'><literal>max-jobs</literal></link> linkend='conf-max-jobs'><literal>max-jobs</literal></link>
configuration setting, which itself defaults to configuration setting, which itself defaults to
<literal>1</literal>. A higher value is useful on SMP systems or to <literal>1</literal>. A higher value is useful on SMP systems or to
exploit I/O latency.</para></listitem> exploit I/O latency.</para>
<para> Setting it to <literal>0</literal> disallows building on the local
machine, which is useful when you want builds to happen only on remote
builders.</para>
</listitem>
</varlistentry> </varlistentry>