From 44e8dd5cea9cdae04eecd7e15cdfc45a96643cd5 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 8 Jun 2020 23:11:36 +0200 Subject: treewide: harmonize ssh calls --- pkgs/krops/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/krops/default.nix') diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index 2a1b629..ab74bc3 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -5,7 +5,7 @@ in { nix, openssh, populate, writers }: rec { build = target: - remoteCommand target (lib.concatStringsSep " " [ + runShell target (lib.concatStringsSep " " [ "nix build" "-I ${lib.escapeShellArg target.path}" "--no-link -f ''" @@ -13,11 +13,11 @@ in ]); rebuild = args: target: - remoteCommand target "nixos-rebuild -I ${lib.escapeShellArg target.path} ${ + runShell target "nixos-rebuild -I ${lib.escapeShellArg target.path} ${ lib.concatMapStringsSep " " lib.escapeShellArg args }"; - remoteCommand = target: command: + runShell = target: command: if lib.isLocalTarget target then command else @@ -25,7 +25,7 @@ in exec ${openssh}/bin/ssh ${lib.escapeShellArgs (lib.flatten [ (lib.optionals (target.user != "") ["-l" target.user]) "-p" target.port - "-t" + "-T" target.extraOptions target.host (if target.sudo then "sudo ${command}" else command)])} @@ -43,7 +43,7 @@ in writers.writeDash name '' set -efu ${populate { inherit backup force source; target = target'; }} - ${remoteCommand target' (command target'.path)} + ${runShell target' (command target'.path)} ''; writeDeploy = name: { -- cgit v1.2.3