nixos-rebuild: Move the Nix fallback store paths into a separate file

This commit is contained in:
Eelco Dolstra 2016-09-06 16:07:24 +02:00
parent 5cbfbb1553
commit 1fef99942e
3 changed files with 16 additions and 7 deletions

View File

@ -0,0 +1,5 @@
{
x86_64-linux = "/nix/store/xryr9g56h8yjddp89d6dw12anyb4ch7c-nix-1.10";
i686-linux = "/nix/store/2w92k5wlpspf0q2k9mnf2z42prx3bwmv-nix-1.10";
}

View File

@ -261,9 +261,9 @@ fi
prebuiltNix() {
machine="$1"
if [ "$machine" = x86_64 ]; then
echo /nix/store/xryr9g56h8yjddp89d6dw12anyb4ch7c-nix-1.10
echo @nix_x86_64_linux@
elif [[ "$machine" =~ i.86 ]]; then
echo /nix/store/2w92k5wlpspf0q2k9mnf2z42prx3bwmv-nix-1.10
echo @nix_i686_linux@
else
echo "$0: unsupported platform"
exit 1

View File

@ -32,11 +32,15 @@ let
"cp refs $out";
};
nixos-rebuild = makeProg {
name = "nixos-rebuild";
src = ./nixos-rebuild.sh;
nix = config.nix.package.out;
};
nixos-rebuild =
let fallback = import ./nix-fallback-paths.nix; in
makeProg {
name = "nixos-rebuild";
src = ./nixos-rebuild.sh;
nix = config.nix.package.out;
nix_x86_64_linux = fallback.x86_64-linux;
nix_i686_linux = fallback.i686-linux;
};
nixos-generate-config = makeProg {
name = "nixos-generate-config";