diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/krops/default.nix | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index 4760287..ab2a722 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -18,15 +18,18 @@ in }"; remoteCommand = target: command: - writers.writeDash "build.${target.host}" '' - exec ${openssh}/bin/ssh ${lib.escapeShellArgs (lib.flatten [ - (lib.optionals (target.user != "") ["-l" target.user]) - "-p" target.port - "-t" - target.extraOptions - target.host - (if target.sudo then "sudo ${command}" else command)])} - ''; + if lib.isLocalTarget target + then command + else + writers.writeDash "build.${target.host}" '' + exec ${openssh}/bin/ssh ${lib.escapeShellArgs (lib.flatten [ + (lib.optionals (target.user != "") ["-l" target.user]) + "-p" target.port + "-t" + target.extraOptions + target.host + (if target.sudo then "sudo ${command}" else command)])} + ''; writeCommand = name: { command ? (targetPath: "echo ${targetPath}"), |