1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-22 19:19:46 +01:00

Add flag to nixos-rebuild

In the case we need sudo for the remote target, the flag
`--use-remote-sudo` must be passed if the target's ssh user is not root.

If target's ssh user is root, it doesn't hurt to use sudo.
This commit is contained in:
Martin Potier 2020-11-20 17:04:30 +02:00
parent 5ea125514e
commit b83fd5c682
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E

View file

@ -80,6 +80,8 @@ in
] ++ lib.optionals (buildTarget' != target') [
"--build-host" "${buildTarget'.user}@${buildTarget'.host}"
"--target-host" "${target'.user}@${target'.host}"
] ++ lib.optionals target'.sudo [
"--use-remote-sudo"
]) buildTarget'}
'';