Distributed build: Difference between revisions
Malteneuss (talk | contribs) m Fix indentation |
Malteneuss (talk | contribs) m Rephrase ssh test |
||
| (One intermediate revision by the same user not shown) | |||
| Line 38: | Line 38: | ||
The thing to know about the '''"Multi-user"''' installation is that '''Nix is installed with a "nix-daemon" background process that runs as root''' and actually manages the builds on your behalf. So when you call '''"nix build ..." as a non-root user, this is delegated to the nix-daemon''' process, which runs as root. And this process can further delegate the build to a remote builder; that's why the '''local machine's root user''' needs the SSH access. | The thing to know about the '''"Multi-user"''' installation is that '''Nix is installed with a "nix-daemon" background process that runs as root''' and actually manages the builds on your behalf. So when you call '''"nix build ..." as a non-root user, this is delegated to the nix-daemon''' process, which runs as root. And this process can further delegate the build to a remote builder; that's why the '''local machine's root user''' needs the SSH access. | ||
{{Tip|The best | {{Tip|The best test to check that the SSH access works for Nix is to run on your local machine: | ||
nix store ping --store ssh://<REMOTE-BUILDER> | nix store ping --store ssh://<REMOTE-BUILDER> | ||
| Line 140: | Line 140: | ||
# systems = ["x86_64-linux" "aarch64-linux" "riscv64-linux"]; | # systems = ["x86_64-linux" "aarch64-linux" "riscv64-linux"]; | ||
system = "x86_64-linux"; | system = "x86_64-linux"; | ||
# Nix custom ssh-variant that avoids lots of "trusted-users" settings pain | |||
protocol = "ssh-ng"; | protocol = "ssh-ng"; | ||
# default is 1 but may keep the builder idle in between builds | # default is 1 but may keep the builder idle in between builds | ||