Distributed build: Difference between revisions
imported>IgorM fixed instructions for trusted-users in nix |
Malteneuss (talk | contribs) m Extend explanations of buildMachines |
||
| Line 103: | Line 103: | ||
{ | { | ||
# You can see the resulting builder-strings of this NixOS-configuration with "cat /etc/nix/machines". | |||
# These builder-strings are used by the Nix terminal tool, e.g. | |||
# when calling "nix build ...". | |||
nix.buildMachines = [{ | |||
# Will be used to call "ssh <hostName>" to connect to the builder machine. | |||
# The details of the connection (user, port, url etc.) | |||
# are taken from your "~/.ssh/config" file. | |||
hostName = "builder"; | |||
# CPU architecture of the builder, and the operating system it runs. | |||
# Replace the line by the architecture of your builder, e.g. | |||
# - Normal Intel/AMD CPUs use "x86_64-linux" | |||
# - Raspberry Pi 4 and 5 use "aarch64-linux" | |||
# - M1, M2, M3 ARM Macs use "aarch64-darwin" | |||
# - Newer RISCV computers use "riscv64-linux" | |||
# If your builder supports multiple architectures | |||
# (e.g. search for "binfmt" for emulation), | |||
# you can list them all, e.g. replace with | |||
# systems = ["x86_64-linux" "aarch64-linux" "riscv64-linux"]; | |||
system = "x86_64-linux"; | |||
protocol = "ssh-ng"; | |||
# default is 1 but may keep the builder idle in between builds | |||
maxJobs = 3; | |||
# how fast is the builder compared to your local machine | |||
speedFactor = 2; | |||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; | |||
mandatoryFeatures = [ ]; | |||
}]; | |||
# required, otherwise remote buildMachines above aren't used | |||
nix.distributedBuilds = true; | |||
# optional, useful when the builder has a faster internet connection than yours | |||
nix.extraOptions = '' | |||
builders-use-substitutes = true | |||
''; | |||
} | } | ||
</nowiki>}} | </nowiki>}} | ||