diff --git a/installer/nixos-rebuild.sh b/installer/nixos-rebuild.sh index 6a3b3a400500..c1df6e5613c6 100644 --- a/installer/nixos-rebuild.sh +++ b/installer/nixos-rebuild.sh @@ -24,13 +24,14 @@ if test -z "$action"; then showSyntax; fi # Allow the location of NixOS sources and the system configuration # file to be overridden. -if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi -if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi +NIXOS=${NIXOS:-/etc/nixos/nixos} +NIXPKGS=${NIXPKG:-/etc/nixos/nixpkgs} +NIXOS_CONFIG=${NIXOS_CONFIG:-/etc/nixos/configuration.nix} # Pull the manifests defined in the configuration (the "manifests" # attribute). Wonderfully hacky. -if test -z "$NIXOS_NO_PULL"; then +if test "${NIXOS_PULL:-1}" != 0; then manifests=$(nix-instantiate --eval-only --xml --strict $NIXOS -A manifests \ | grep '