From b83fd5c6827d831e0c185fe40a21581afbefc27b Mon Sep 17 00:00:00 2001 From: Martin Potier Date: Fri, 20 Nov 2020 17:04:30 +0200 Subject: 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. --- pkgs/krops/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index 184a12a..8336b51 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -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'} ''; -- cgit v1.2.3