It's time consuming to set up distributed builds properly, no test case for that mechanism as well.
When configured improperly, error messages are not very useful.
Observe empty output
Open NixOS documentation (1 html page)
For reference: http://nixos.org/nix/manual/#chap-distributed-builds
I rewrote the nixos.wiki entry about this: https://nixos.wiki/wiki/Distributed_build
The article mentions that there is a NixOS test: https://github.com/NixOS/nix/blob/master/tests/remote-builds.nix#L46-L58
I failed to get it works on nixos-18.03. I have en error:
error: unable to start any build; either increase '--max-jobs' or enable remote builds
My configuration:
...
nix = {
autoOptimiseStore = true;
maxJobs = 0; # disable build on local machine
buildCores = 4;
buildMachines = [
{
hostName = "builder";
system = "x86_64-linux";
maxJobs = 4;
supportedFeatures = [ ];
mandatoryFeatures = [ ];
}
];
distributedBuilds = true;
extraOptions = ''
builders-use-substitutes = true
'';
};
Of course, the root have access to builder and can run nix commands:
[root@nixie-laptop:~]# ssh builder nix-store --version
Warning: Permanently added 'debi,192.168.13.139' (ECDSA) to the list of known hosts.
nix-store (Nix) 2.0.2
[root@nixie-laptop:~]# nix ping-store --store ssh://builder
Warning: Permanently added 'debi,192.168.13.139' (ECDSA) to the list of known hosts.
What are you trying to build ? can you try to build with -vvvvvv ?
For example, nixos-tests need supportedFeatures=[ "kvm" "nixos-test"] otherwise nix will silently ignore the builders.
It seems to be works when I added "big-parallel" to the supportedFeatures.
I updated the article to talk about features. Feel free to edit according to your experience.
@symphorien Thanks
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
@3noch @symphorien @katyo : thank you!
Most helpful comment
I updated the article to talk about features. Feel free to edit according to your experience.