Distributed builds require sudo on multi-user Nix, but sudo changes the
user to root. This means that if you omit the user in the --host argument
to nix-delegate then the distributed builds will try to ssh as root@host,
which should fail.
This fixes nix-delegate to prepend $USER to the hostname when using sudo
if the username was not already specified.
Distributed builds require
sudo
on multi-user Nix, butsudo
changes the user toroot
. This means that if you omit the user in the--host
argument tonix-delegate
then the distributed builds will try tossh
asroot@host
, which should fail.This fixes
nix-delegate
to prepend$USER
to the hostname when usingsudo
if the username was not already specified.