diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index f58b68cb3353..8688b5ad9bfb 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -251,7 +251,8 @@ let postInstall = '' echo checking syntax # check both with bash - ${pkgs.bash}/bin/sh -n $target + ${pkgs.buildPackages.bash}/bin/sh -n $target + '' + optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' # and with ash shell, just in case ${extraUtils}/bin/ash -n $target '';