awakesecurity / nix-delegate

Convenient utility for distributed Nix builds
Other
88 stars 6 forks source link

Explicitly specify username when using multi-user Nix #8

Closed Gabriella439 closed 6 years ago

Gabriella439 commented 6 years ago

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.