summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorMartin Potier <martin.potier@marvid.fr>2020-11-20 17:04:30 +0200
committerMartin Potier <martin.potier@marvid.fr>2020-11-20 17:04:30 +0200
commitb83fd5c6827d831e0c185fe40a21581afbefc27b (patch)
treefc8d55ce8d89c591a57a70c280031f7109d8264b /pkgs
parent5ea125514e48c630120fbb6a44e9ae0c7932a123 (diff)
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/krops/default.nix2
1 files changed, 2 insertions, 0 deletions
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'}
'';