summaryrefslogtreecommitdiffstats
path: root/Makefile
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 /Makefile
parent9a4071b66ff45e99a30e9a314eb43c6efc7e921f (diff)
parent372f2d77f301719e396a6f943657325e2f8b2cf4 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index f39ed0c02..384c872ab 100644
--- a/Makefile
+++ b/Makefile
@@ -4,14 +4,16 @@ endif
export target_host ?= $(system)
export target_user ?= root
+export target_port ?= 22
export target_path ?= /var/src
evaluate = \
nix-instantiate \
- --arg configuration ./$(LOGNAME)/1systems/$(system).nix \
--eval \
--readonly-mode \
--show-trace \
+ -I nixos-config=./$(LOGNAME)/1systems/$(system).nix \
+ -I stockholm=. \
$(1)
execute = \
@@ -22,19 +24,20 @@ 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 --show-trace -I $(target_path)
# usage: make LOGNAME=shared system=wolf eval.config.krebs.build.host.name
eval eval.:;@$(call evaluate)
eval.%:;@$(call evaluate,-A $*)
# usage: make install system=foo [target_host=bar]
-install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
+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