summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/build.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-02-15 17:07:48 +0100
committermakefu <github@syntax-fehler.de>2016-02-15 17:07:48 +0100
commit3ceff0ec29a36119ea83f02c8943752d91b250e9 (patch)
tree7b179bc972ea01c9305ea64697e14237346885d8 /krebs/3modules/build.nix
parent9a4071b66ff45e99a30e9a314eb43c6efc7e921f (diff)
parent372f2d77f301719e396a6f943657325e2f8b2cf4 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/3modules/build.nix')
-rw-r--r--krebs/3modules/build.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/krebs/3modules/build.nix b/krebs/3modules/build.nix
index 3530fd59..a1f44618 100644
--- a/krebs/3modules/build.nix
+++ b/krebs/3modules/build.nix
@@ -1,6 +1,6 @@
{ config, lib, ... }:
-with lib;
+with config.krebs.lib;
let
out = {
@@ -51,6 +51,7 @@ let
source = config.krebs.build.source;
target-user = maybeEnv "target_user" "root";
target-host = maybeEnv "target_host" config.krebs.build.host.name;
+ target-port = maybeEnv "target_port" "22";
target-path = maybeEnv "target_path" "/var/src";
out = ''
#! /bin/sh
@@ -62,7 +63,8 @@ let
}
echo ${shell.escape git-script} \
- | ssh ${shell.escape "${target-user}@${target-host}"} -T
+ | ssh -p ${shell.escape target-port} \
+ ${shell.escape "${target-user}@${target-host}"} -T
unset tmpdir
trap '
@@ -93,6 +95,7 @@ let
(attrNames file-specs)} \
--delete \
-vFrlptD \
+ -e ${shell.escape "ssh -p ${target-port}"} \
${shell.escape target-path}/ \
${shell.escape "${target-user}@${target-host}:${target-path}"}
'';