diff options
| author | lassulus <lass@aidsballs.de> | 2015-07-23 02:26:42 +0200 |
|---|---|---|
| committer | lassulus <lass@aidsballs.de> | 2015-07-23 02:26:42 +0200 |
| commit | 10b10c59c24e1580889311e2c1a0ea7f3300e813 (patch) | |
| tree | 8249b4e2713aeabdf4a9d1aeee4c38e1a527e487 /Makefile | |
| parent | 264a24c5346b926366b5e5716c26af64de398572 (diff) | |
| parent | 27fe9055334443370a86307ed08d51b2606f509d (diff) | |
Merge branch 'tv' into master
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -2,6 +2,7 @@ # usage: # make system=foo # make systems='foo bar' +# make eval system=foo get=config.networking.extraHosts # .ONESHELL: @@ -82,6 +83,20 @@ deploy:;@ result/bin/switch-to-configuration switch EOF + +.PHONY: eval +eval: + @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 . else $(error unbound variable: system[s]) endif |
