Skip to content

Settings

There are a number of settings available that can impact how nixbuild.net behaves when you use the service. The settings are represented as a flat list of key-value pairs. All settings have reasonable default values so you don't need to change anything, but it is recommended to read through this page to get a feeling for what is possible.

Settings can be configured on the following levels, in order of significance (settings defined later in this list overrides earlier settings):

  • System configuration (default settings) — Not configurable by the end user.

  • Account configuration — Settings that are used for all users of the same account. Configurable by end users through the nixbuild.net shell.

  • SSH environment configuration — Settings used for a specific SSH session. Configurable by end users through their SSH client configuration.

  • Nix derivation configuration — Settings used for a specific build. Configurable by end users by setting special attributes in their Nix derivations.

Configuration

Account

See the nixbuild.net shell documentation for instructions on how to configure account-wide settings.

SSH Environment

You can use the SetEnv option of OpenSSH to configure nixbuild.net via your SSH session. Each setting needs to capitalized, prepended with NIXBUILDNET_ and hyphens should be replace with underscores. This is an example of how your SSH client config could look like:

Host eu.nixbuild.net
  SetEnv NIXBUILDNET_KEEP_BUILDS_RUNNING=true NIXBUILDNET_CACHE_BUILD_FAILURES=false

Boolean true values are encoded with true or 1. False values are encoded with false, 0 or an empty string.

You can make use of host aliases in you ssh configuration to create "virtual" builders that configure nixbuild.net in different ways.

The SetEnv option was added in OpenSSH 7.8. If you use an older version you can look into the SendEnv option, which works slightly differently.

Nix Derivation

Use derivation attributes to use specific settings for individual builds:

mkDerivation {
  name = "...";
  src = ...;

  NIXBUILDNET_KEEP_BUILDS_RUNNING = true;
}

The variable names use the same format as the ssh environment does.

Available Settings

cache-build-failures

Boolean, default true

When enabled, nixbuild.net will not rebuild a derivation that already has failed for your own or any other account. The derivations (and the content hashes of their inputs) must match exactly in order to be re-used. Only non-transient errors will be re-used.

cache-build-timeouts

Boolean, default false

If enabled, nixbuild.net will check if any previous build (performed by any account) of the exact same derivation took longer time than the timeout specified (by your Nix client) for the new build. If so, nixbuild.net will not run the build, but instead serve back a timed out build status.

keep-builds-running

Boolean, default false

If enabled, active builds will keep running even if you stop your Nix client or in any other way disconnect from nixbuild.net. The builds will keep running until they are done (or fail). If you re-request a build of such a "disconnected build" nixbuild.net will simply wait for the running build to finish and then deliver the resulting build for your new request.

Please note that disconnected builds incur costs in the same way as normal builds.

always-substitute

Boolean, default false

If enabled, nixbuild.net will ignore the builders-use-substitute setting reported by your Nix client, and always try to perform substitution from the binary caches configured for your account.

never-substitute

Boolean, default false

If enabled, nixbuild.net will ignore both the always-substitute setting and the builders-use-substitute setting reported by your Nix client, and never perform substitution from binary caches.