mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
194a24bcf1
change a NixOS installation from x86_64-linux to i686-linux (or vice versa if you have distributed builds enabled - I used this upgrade from 32-bit to 64-bit NixOS). svn path=/nixos/trunk/; revision=18177
34 lines
670 B
Nix
34 lines
670 B
Nix
{ configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" /etc/nixos/configuration.nix
|
|
, system ? builtins.currentSystem
|
|
}:
|
|
|
|
let
|
|
|
|
eval = import ./lib/eval-config.nix {
|
|
inherit system;
|
|
modules = [ configuration ];
|
|
};
|
|
|
|
inherit (eval) config pkgs;
|
|
|
|
vmConfig = (import ./lib/eval-config.nix {
|
|
inherit system;
|
|
modules = [ configuration ./modules/virtualisation/qemu-vm.nix ];
|
|
}).config;
|
|
|
|
in
|
|
|
|
{
|
|
inherit eval config;
|
|
|
|
system = config.system.build.toplevel;
|
|
|
|
vm = vmConfig.system.build.vm;
|
|
|
|
# The following are used by nixos-rebuild.
|
|
nixFallback = pkgs.nixUnstable;
|
|
manifests = config.installer.manifests;
|
|
|
|
tests = config.tests;
|
|
}
|