summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a25b90771..c7dee134c 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