summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-02 01:53:38 +0100
committertv <tv@krebsco.de>2016-02-02 01:57:32 +0100
commit2497533b90ce901a39d6642923738b2a337ad9aa (patch)
tree82618fd54256582b24fe77321bbdae119e1abcc1 /Makefile
parent07fa0d989609faca2e9f9847165db61428206ef7 (diff)
krebs/populate.nix -> krebs/v2 populate
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a35d6d128..d7534e1f3 100644
--- a/Makefile
+++ b/Makefile
@@ -33,15 +33,20 @@ deploy2: export target-host = $(target)
else
deploy2: export target-host = $(system)
endif
+deploy2: export source = \
+ with (import ~/stockholm {}).users.$(LOGNAME).$(system).config.krebs.build; \
+ assert source-version == 2; \
+ source
deploy2:;@
target=$${target-$$system}
result=$$(nix-instantiate \
- --json \
--eval \
- krebs/populate.nix \
- --arg source 'with (import ~/stockholm {}).users.$(LOGNAME).$(system).config.krebs.build; assert source-version == 2; source' \
+ --json \
+ --arg source "$$source" \
--argstr target-host "$$target" \
- --argstr target-path /var/src)
+ --argstr target-path /var/src \
+ -A populate \
+ krebs/v2)
script=$$(echo "$$result" | jq -r .)
echo "$$script" | sh
ssh root@$$target nixos-rebuild switch -I /var/src