nixos-build: construct NIXOS_CONFIG and NIX_PATH
This commit is contained in:
parent
cef42fc9b5
commit
cc31863564
@ -6,24 +6,19 @@ set -euf
|
|||||||
|
|
||||||
host=$1
|
host=$1
|
||||||
|
|
||||||
#target=root@$host
|
NIXOS_CONFIG=$config_root/modules/$host
|
||||||
|
export NIXOS_CONFIG
|
||||||
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
|
|
||||||
|
|
||||||
# Notice how host's NIX_PATH is used to prefetch nixpkgs.
|
# Notice how host's NIX_PATH is used to prefetch nixpkgs.
|
||||||
NIXOS_CONFIG=$nixos_config \
|
prefetch nixpkgs "$nixpkgs_root/$host"
|
||||||
prefetch nixpkgs tmp/nixpkgs/$host
|
|
||||||
|
|
||||||
nix-build \
|
NIX_PATH=$nixpkgs_root/$host
|
||||||
-I "$nixpkgs" \
|
NIX_PATH=$NIX_PATH:secrets=$secrets_root/$host/nix
|
||||||
-I pubkeys="$pubkeys" \
|
NIX_PATH=$NIX_PATH:pubkeys=$config_root/pubkeys
|
||||||
-I nixos-config="$nixos_config" \
|
NIX_PATH=$NIX_PATH:retiolum-hosts=$retiolum_hosts
|
||||||
-I retiolum-hosts="$retiolum_hosts" \
|
export NIX_PATH
|
||||||
-I secrets="$secrets_nix" \
|
|
||||||
-A system \
|
exec nix-build \
|
||||||
--no-out-link \
|
-A system \
|
||||||
'<nixos>'
|
--no-out-link \
|
||||||
|
'<nixos>'
|
||||||
|
Loading…
Reference in New Issue
Block a user