diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index 42e1a33a4446..b62da16c7b7f 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -152,7 +152,7 @@ fi if test -z "$rollback"; then echo "building the system configuration..." >&2 if test "$action" = switch -o "$action" = boot; then - nix-env -p /nix/var/nix/profiles/system -f '' --set -A system $extraBuildFlags + nix-env $extraBuildFlags -p /nix/var/nix/profiles/system -f '' --set -A system pathToConfig=/nix/var/nix/profiles/system elif test "$action" = test -o "$action" = build -o "$action" = dry-run; then nix-build '' -A system -K -k $extraBuildFlags > /dev/null