summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
committerlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
commit54a01c0c74bdd4233962d62c4e6631f7f8b50f77 (patch)
tree705a3f8307b49e52bd95ecac8cd6d6ca828921a4 /Makefile
parent6476abd6ac7e000d0759569a1e2754acb2f518ca (diff)
parent3197897292f0fc8f38d30ad6ddc9742be4a7cc1d (diff)
Merge branch 'tv' into master
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index da234677b..6d075e6f2 100644
--- a/Makefile
+++ b/Makefile
@@ -41,13 +41,14 @@ deploy:;@
"$$src/" "$$deploy_host:$$dst"
)}
- prepush /root/src/shitment "$$PWD"
+ prepush /root/src/stockholm "$$PWD"
prepush /root/src/secrets "$$secrets_dir"
ssh -S none "$$deploy_host" -T env \
nixpkgs_url="$$nixpkgs_url" \
nixpkgs_rev="$$nixpkgs_rev" \
system_name="$$system_name" \
+ user_name="$$LOGNAME" \
sh -euf \
<<-\EOF
prefetch(){(
@@ -77,26 +78,30 @@ deploy:;@
prefetch /root/src/nixpkgs "$$nixpkgs_url" "$$nixpkgs_rev"
echo build system...
- NIXOS_CONFIG=/root/src/shitment/1systems/$(LOGNAME)/$$system_name.nix \
- NIX_PATH=src \
- nix-build -Q -A system '<nixpkgs/nixos>'
+ NIX_PATH=/root/src \
+ nix-build \
+ -Q \
+ -A system \
+ '<stockholm>' \
+ --argstr user-name "$$user_name" \
+ --argstr system-name "$$system_name"
result/bin/switch-to-configuration switch
EOF
.PHONY: eval
eval:
- @nix-instantiate \
+ @
+ NIX_PATH=stockholm=$$PWD:$$NIX_PATH \
+ nix-instantiate \
--json \
--eval \
--strict \
-A "$$get" \
- -E '
- import <nixpkgs/nixos/lib/eval-config.nix> {
- system = builtins.currentSystem;
- modules = [ ./1systems/$(LOGNAME)/$(system).nix ];
- }
- ' | jq -r .
+ '<stockholm>' \
+ --argstr user-name "$$LOGNAME" \
+ --argstr system-name "$$system" \
+ | jq -r .
else
$(error unbound variable: system[s])
endif