diff options
author | lassulus <lass@aidsballs.de> | 2016-02-01 15:17:16 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-02-01 15:17:16 +0100 |
commit | 72dc2dd7fa54c77e08052efed21f68758fa533a2 (patch) | |
tree | f2c4e93c670764134913408a6d43c2ff6c6ac15e /Makefile | |
parent | 186d5cc95a7430136da3107734409511c64d7080 (diff) | |
parent | 1a5a3c0cf2aba173772765c24a0865bb2da6b691 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -24,7 +24,27 @@ else ifdef system deploy infest:;@ export get=krebs.$@ export filter=json - make -s eval | sh + script=$$(make -s eval) + echo "$$script" | sh + +.PHONY: deploy2 +ifdef target +deploy2: export target-host = $(target) +else +deploy2: export target-host = $(system) +endif +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' \ + --argstr target-host "$$target" \ + --argstr target-path /var/src) + script=$$(echo "$$result" | jq -r .) + echo "$$script" | sh + ssh root@$$target nixos-rebuild switch -I /var/src .PHONY: eval eval: |