summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-02-12 22:03:29 +0100
committermakefu <github@syntax-fehler.de>2016-02-12 22:03:29 +0100
commit1c850bb26f931224eceb1dd35e620e0f5aeb19ed (patch)
tree946654504280fe8a9a2a0b66df8116e7b583ae2b /Makefile
parent08b03ef2e7dc6eff237c213ee341d0da6b9a0d96 (diff)
parent1497ee718256ff48c65ebcb0ddea633c6628eb69 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 12 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index e61d16b75..f39ed0c02 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ export target_path ?= /var/src
evaluate = \
nix-instantiate \
- --arg configuration "./$$LOGNAME/1systems/$$system.nix" \
+ --arg configuration ./$(LOGNAME)/1systems/$(system).nix \
--eval \
--readonly-mode \
--show-trace \
@@ -22,20 +22,19 @@ execute = \
# usage: make deploy system=foo [target_host=bar]
deploy:
$(call execute,populate)
- @set -x; ssh "$$target_user@$$target_host" nixos-rebuild switch -I "$$target_path"
+ ssh $(target_user)@$(target_host) nixos-rebuild switch -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=
-#.PHONY: install
-#install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
-#install:;@set -x
-# $(ssh) "$$target_user@$$target_host" \
-# env target_path="$target_path" \
-# sh -s prepare < krebs/4lib/infest/prepare.sh
-# make -s populate target_path=/mnt"$$target_path"
-# $(ssh) "$$target_user@$$target_host" \
-# env NIXOS_CONFIG=/var/src/nixos-config \
-# nixos-install
+# usage: make install system=foo [target_host=bar]
+install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
+install:
+ $(ssh) $(target_user)@$(target_host) \
+ 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) \
+ env NIXOS_CONFIG=$(target_path)/nixos-config \
+ nixos-install