about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDomen Kožar <domen@enlambda.com>2019-04-29T05·44+0700
committerGitHub <noreply@github.com>2019-04-29T05·44+0700
commit83f2b110cecf50877ce1585c698dbed6dd225562 (patch)
tree8f04118b586ae72c660af7cd7c89809483dfe4e8
parentf22540464fc2e7bbfd441f275b7581f2d4f14eb5 (diff)
parentcaa76c369a6d77eb3ccaa14bd8144581c8cd50a7 (diff)
Merge pull request #2750 from nh2/max-jobs-0-docs
docs: Mention `--max-jobs 0` to build remotely only
-rw-r--r--doc/manual/advanced-topics/distributed-builds.xml3
-rw-r--r--doc/manual/command-ref/opt-common.xml12
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/manual/advanced-topics/distributed-builds.xml b/doc/manual/advanced-topics/distributed-builds.xml
index ce2e077ed7be..9ac4a92cd5b1 100644
--- a/doc/manual/advanced-topics/distributed-builds.xml
+++ b/doc/manual/advanced-topics/distributed-builds.xml
@@ -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>
 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>
diff --git a/doc/manual/command-ref/opt-common.xml b/doc/manual/command-ref/opt-common.xml
index 4c572e129445..b8a2f260e8fe 100644
--- a/doc/manual/command-ref/opt-common.xml
+++ b/doc/manual/command-ref/opt-common.xml
@@ -107,14 +107,22 @@
 <varlistentry xml:id="opt-max-jobs"><term><option>--max-jobs</option> / <option>-j</option>
 <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
   <literal>auto</literal> to use the number of CPUs in the system.
   The default is specified by the <link
   linkend='conf-max-jobs'><literal>max-jobs</literal></link>
   configuration setting, which itself defaults 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>