61 Maximum number of jobs that Nix tries to build locally in parallel.
62
63 The special value `auto` causes Nix to use the number of CPUs in your system.
64 Use `0` to disable local builds and directly use the remote machines specified in [`builders`](#conf-builders).
65 This doesn't affect derivations that have [`preferLocalBuild = true`](@docroot@/language/advanced-attributes.md#adv-attr-preferLocalBuild), which are always built locally.
66
67 > **Note**
68 >
69 > The number of CPU cores to use for each build job is independently determined by the [`cores`](#conf-cores) setting.
70
71 <!-- TODO(@fricklerhandwerk): would be good to have those shorthands for common options as part of the specification -->
72 The setting can be overridden using the `--max-jobs` (`-j`) command line switch.
146 A semicolon- or newline-separated list of build machines.
147
148 In addition to the [usual ways of setting configuration options](@docroot@/command-ref/conf-file.md), the value can be read from a file by prefixing its absolute path with `@`.
149
150 > **Example**
151 >
152 > This is the default setting:
153 >
154 > ```
155 > builders = @/etc/nix/machines
156 > ```
157
158 Each machine specification consists of the following elements, separated by spaces.
159 Only the first element is required.
160 To leave a field at its default, set it to `-`.
161
162 1. The URI of the remote store in the format `ssh://[username@]hostname[:port]`.
163
164 > **Example**
165 >
166 > `ssh://nix@mac`
167
168 For backward compatibility, `ssh://` may be omitted.
169 The hostname may be an alias defined in `~/.ssh/config`.
170
171 2. A comma-separated list of [Nix system types](@docroot@/development/building.md#system-type).
172 If omitted, this defaults to the local platform type.
173
174 > **Example**
175 >
176 > `aarch64-darwin`
177
178 It is possible for a machine to support multiple platform types.
179
180 > **Example**
181 >
182 > `i686-linux,x86_64-linux`
183
184 3. The SSH identity file to be used to log in to the remote machine.
185 If omitted, SSH uses its regular identities.
186
187 > **Example**
188 >
189 > `/home/user/.ssh/id_mac`
190
191 4. The maximum number of builds that Nix executes in parallel on the machine.
192 Typically this should be equal to the number of CPU cores.
193
194 5. The “speed factor”, indicating the relative speed of the machine as a positive integer or decimal number.
195 If there are multiple machines of the right type, Nix prefers the fastest, taking load into account.
196
197 6. A comma-separated list of supported [system features](#conf-system-features).
198
199 A machine is only used to build a derivation if all the features in the derivation's [`requiredSystemFeatures`](@docroot@/language/advanced-attributes.html#adv-attr-requiredSystemFeatures) attribute are supported by that machine.
200
201 7. A comma-separated list of required [system features](#conf-system-features).
202
203 A machine is only used to build a derivation if all of the machine’s required features appear in the derivation’s [`requiredSystemFeatures`](@docroot@/language/advanced-attributes.html#adv-attr-requiredSystemFeatures) attribute.
204
205 8. The (base64-encoded) public host key of the remote machine.
206 If omitted, SSH uses its regular `known_hosts` file.
207
208 The value for this field can be obtained via `base64 -w0`.
209
210 > **Example**
211 >
212 > Multiple builders specified on the command line:
240 > `itchy` cannot do builds that require `kvm`, but `scratchy` does support such builds.
241 > For regular builds, `itchy` is preferred over `scratchy` because it has a higher speed factor.
242
243 For Nix to use substituters, the calling user must be in the [`trusted-users`](#conf-trusted-users) list.
244
245 > **Note**
246 >
247 > A build machine must be accessible via SSH and have Nix installed.
248 > `nix` must be available in `$PATH` for the user connecting over SSH.
249
250 > **Warning**
251 >
252 > If you are building via the Nix daemon (default), the Nix daemon user account on the local machine (that is, `root`) requires access to a user account on the remote machine (not necessarily `root`).
253 >
254 > If you can’t or don’t want to configure `root` to be able to access the remote machine, set [`store`](#conf-store) to any [local store](@docroot@/store/types/local-store.html), e.g. by passing `--store /tmp` to the command on the local machine.
255
256 To build only on remote machines and disable local builds, set [`max-jobs`](#conf-max-jobs) to 0.
257
258 If you want the remote machines to use substituters, set [`builders-use-substitutes`](#conf-builders-use-substitutes) to `true`.
268 If set to `true`, Nix ignores the [`allowSubstitutes`](@docroot@/language/advanced-attributes.md) attribute in derivations and always attempt to use [available substituters](#conf-substituters).
276 If set to `true`, Nix instructs [remote build machines](#conf-builders) to use their own [`substituters`](#conf-substituters) if available.
277
278 It means that remote build hosts fetch as many dependencies as possible from their own substituters (e.g, from `cache.nixos.org`) instead of waiting for the local machine to upload them all.
279 This can drastically reduce build times if the network connection between the local machine and the remote build host is slow.
298 A list of [URLs of Nix stores](@docroot@/store/types/index.md#store-url-format) to be used as substituters, separated by whitespace.
299 A substituter is an additional [store](@docroot@/glossary.md#gloss-store) from which Nix can obtain [store objects](@docroot@/store/store-object.md) instead of building them.
300
301 Substituters are tried based on their priority value, which each substituter can set independently.
302 Lower value means higher priority.
303 The default is `https://cache.nixos.org`, which has a priority of 40.
304
305 At least one of the following conditions must be met for Nix to use a substituter:
306
307 - The substituter is in the [`trusted-substituters`](#conf-trusted-substituters) list
308 - The user calling Nix is in the [`trusted-users`](#conf-trusted-users) list
309
310 In addition, each store path should be trusted as described in [`trusted-public-keys`](#conf-trusted-public-keys)