By default nix uses a mix of local and remote builds to builds things. To avoid
building locally there's a flag --max-jobs 0 so that nix doesn't use your
local machine!
Careful though, as if you don't have any remote builders, it just won't work.
You can provide the remote builders with your command-line arguments --builders 'ssh://machine'.
Note that there are several caveats :
- if sometimes you do big builds, if the derivation is tagged
big-parallel, the builder also needs that. Otherwise it won't get selected. the
--buildersflag only works on root / Trusted userswarning: Ignoring the client-specified setting 'builders', because it is a restricted setting and you are not a trusted userWhich, shouldn't be active for your normal users as IIRC, it's equivalent to
dockergroup, ie, it's a privilege escalation opportunity.
That's it for now!