krebs/populate.nix -> krebs/v2 populate
This commit is contained in:
parent
07fa0d9896
commit
2497533b90
13
Makefile
13
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
|
||||
|
@ -9,7 +9,11 @@ with import ~/stockholm/krebs/4lib {
|
||||
};
|
||||
with builtins;
|
||||
let
|
||||
out = ''
|
||||
out = {
|
||||
inherit populate;
|
||||
};
|
||||
|
||||
populate = ''
|
||||
#! /bin/sh
|
||||
set -efu
|
||||
|
Loading…
Reference in New Issue
Block a user