diff options
author | tv <tv@shackspace.de> | 2015-07-04 10:38:12 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-07-04 10:38:12 +0200 |
commit | cc31863564d996c182f7ede432711be87066fa41 (patch) | |
tree | 7a3691c938ed0d878eb31d16246218cf4cd0d655 /bin | |
parent | cef42fc9b508af7f3987b677d637cf69251102ee (diff) |
nixos-build: construct NIXOS_CONFIG and NIX_PATH
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/nixos-build | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/bin/nixos-build b/bin/nixos-build index cfbf07123..235d7c1f6 100755 --- a/bin/nixos-build +++ b/bin/nixos-build @@ -6,24 +6,19 @@ set -euf host=$1 -#target=root@$host - -pubkeys=$config_root/pubkeys -nixpkgs=$nixpkgs_root/$host -nixos_config=$config_root/modules/$host -secrets_nix=$secrets_root/$host/nix -secrets_rsync=$secrets_root/$host/rsync +NIXOS_CONFIG=$config_root/modules/$host +export NIXOS_CONFIG # Notice how host's NIX_PATH is used to prefetch nixpkgs. -NIXOS_CONFIG=$nixos_config \ - prefetch nixpkgs tmp/nixpkgs/$host +prefetch nixpkgs "$nixpkgs_root/$host" + +NIX_PATH=$nixpkgs_root/$host +NIX_PATH=$NIX_PATH:secrets=$secrets_root/$host/nix +NIX_PATH=$NIX_PATH:pubkeys=$config_root/pubkeys +NIX_PATH=$NIX_PATH:retiolum-hosts=$retiolum_hosts +export NIX_PATH -nix-build \ - -I "$nixpkgs" \ - -I pubkeys="$pubkeys" \ - -I nixos-config="$nixos_config" \ - -I retiolum-hosts="$retiolum_hosts" \ - -I secrets="$secrets_nix" \ - -A system \ - --no-out-link \ - '<nixos>' +exec nix-build \ + -A system \ + --no-out-link \ + '<nixos>' |