summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-13 16:03:40 +0100
committertv <tv@krebsco.de>2016-02-13 16:03:40 +0100
commit411aec6bf9d1b53813e693f22b77972a00ce9078 (patch)
treec85a6b8f31184b04c31f149cbc6c28d811fe882c /Makefile
parent45bd2ca7a2055e6d3f6e3d70edbbc9bebd9cbc40 (diff)
deploy,install,populate: admit target SSH port
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a25b9077..c7dee134 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ endif
export target_host ?= $(system)
export target_user ?= root
+export target_port ?= 22
export target_path ?= /var/src
evaluate = \
@@ -22,7 +23,8 @@ execute = \
# usage: make deploy system=foo [target_host=bar]
deploy:
$(call execute,populate)
- ssh $(target_user)@$(target_host) nixos-rebuild switch -I $(target_path)
+ ssh $(target_user)@$(target_host) -p $(target_port) \
+ nixos-rebuild switch -I $(target_path)
# usage: make LOGNAME=shared system=wolf eval.config.krebs.build.host.name
eval eval.:;@$(call evaluate)
@@ -31,10 +33,10 @@ eval.%:;@$(call evaluate,-A $*)
# usage: make install system=foo [target_host=bar]
install: ssh ?= ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
install:
- $(ssh) $(target_user)@$(target_host) \
+ $(ssh) $(target_user)@$(target_host) -p $(target_port) \
env target_path=$(target_path) \
sh -s prepare < krebs/4lib/infest/prepare.sh
target_path=/mnt$(target_path) $(call execute,populate)
- $(ssh) $(target_user)@$(target_host) \
+ $(ssh) $(target_user)@$(target_host) -p $(target_port) \
env NIXOS_CONFIG=$(target_path)/nixos-config \
nixos-install