On 15-06-2016 11:10:09, zimbatm wrote: > my build machine is currently down but I used to have something like this: > HOWTO remote builds > > - client: your laptop > - build machine: the server that has tons of CPU > > On the build machine, install your client’s ssh public in the > /root/.ssh/authorized_keys.
Is your build machine a nixos machine or a non-nixos with nix installed? If the latter: How did you install nix? I assume as root user, right? > > On the client add something like this in your configuration.nix: > > { > networking.extraHosts = '' > # FIX THE IP HERE > 192.168.0.8 my-build-machine > ''; > nix.maxJobs = 1; # set to 0 to force remote building > nix.distributedBuilds = true; > nix.buildMachines = [ > { hostName = "my-build-machine"; # I have the hostname in my extraHosts > maxJobs = 6; # set to number of CPUs > sshKey = "/home/myuser/.ssh/id_ecdsa"; > sshUser = "root"; > system = "x86_64-linux"; > } > ]; > } > > Apply the config. You should be good to. > Missing things > > In cases where the laptop is on another network you want to disable the > distributed build. Especially if maxJobs = 0 you could end up in a > situation where you can’t build the new configuration because of that. I’m > sure there is a command-line or environment variable to change that config > at runtime but I don’t know how to switch this. That's the point: I don't want to disable it on commandline if I have to, but to enable it on commandline if I have the possibility to do distributed builds. I played around with `<nix command> --option` and setting configuration there, but I failed to get it working. I did not install nix on the remote machine as root, though. That might be the point. -- Mit freundlichen Grüßen, Kind regards, Matthias Beyer Proudly sent with mutt. Happily signed with gnupg.
signature.asc
Description: PGP signature
_______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev