Merge remote-tracking branch 'upstream/master' into systemd
Conflicts: maintainers/scripts/ec2/create-ebs-amis.py
This commit is contained in:
commit
75ec5c609e
@ -50,7 +50,7 @@ let
|
||||
pkgs.sysvtools
|
||||
pkgs.time
|
||||
pkgs.usbutils
|
||||
pkgs.utillinux
|
||||
pkgs.utillinuxCurses
|
||||
extraManpages
|
||||
];
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
{
|
||||
require = [ ./installation-cd-graphical.nix ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_3_2;
|
||||
boot.kernelPackages = pkgs.linuxPackages_3_7;
|
||||
boot.vesa = false;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ had booted this nixos. Run:
|
||||
* `grep local-cmds run/current-system/init`
|
||||
|
||||
Then you can proceed normally subscribing to a nixos channel:
|
||||
nix-channel --add http://nixos.org/releases/nixos/channels/nixos-unstable
|
||||
nix-channel --add http://nixos.org/channels/nixos-unstable
|
||||
nix-channel --update
|
||||
|
||||
Testing:
|
||||
|
@ -13,10 +13,11 @@ let
|
||||
grubConfig = pkgs.writeText "grub-config.xml" (builtins.toXML
|
||||
{ splashImage = f config.boot.loader.grub.splashImage;
|
||||
grub = f grub;
|
||||
shell = "${pkgs.stdenv.shell}";
|
||||
fullVersion = (builtins.parseDrvName config.system.build.grub.name).version;
|
||||
inherit (config.boot.loader.grub)
|
||||
version extraConfig extraPerEntryConfig extraEntries
|
||||
extraEntriesBeforeNixOS configurationLimit copyKernels timeout
|
||||
extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout
|
||||
default devices;
|
||||
path = makeSearchPath "bin" [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils ];
|
||||
});
|
||||
|
@ -30,6 +30,7 @@ sub writeFile {
|
||||
my $grub = get("grub");
|
||||
my $grubVersion = int(get("version"));
|
||||
my $extraConfig = get("extraConfig");
|
||||
my $extraPrepareConfig = get("extraPrepareConfig");
|
||||
my $extraPerEntryConfig = get("extraPerEntryConfig");
|
||||
my $extraEntries = get("extraEntries");
|
||||
my $extraEntriesBeforeNixOS = get("extraEntriesBeforeNixOS") eq "true";
|
||||
@ -189,6 +190,8 @@ addEntry("NixOS - Default", $defaultConfig);
|
||||
|
||||
$conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS;
|
||||
|
||||
# extraEntries could refer to @bootRoot@, which we have to substitute
|
||||
$conf =~ s/\@bootRoot\@/$bootRoot/g;
|
||||
|
||||
# Add entries for all previous generations of the system profile.
|
||||
$conf .= "submenu \"NixOS - Old configurations\" {\n" if $grubVersion == 2;
|
||||
@ -212,6 +215,10 @@ foreach my $link (@links) {
|
||||
|
||||
$conf .= "}\n" if $grubVersion == 2;
|
||||
|
||||
# Run extraPrepareConfig in sh
|
||||
if ($extraPrepareConfig ne "") {
|
||||
system((get("shell"), "-c", $extraPrepareConfig));
|
||||
}
|
||||
|
||||
# Atomically update the GRUB config.
|
||||
my $confFile = $grubVersion == 1 ? "/boot/grub/menu.lst" : "/boot/grub/grub.cfg";
|
||||
|
@ -22,17 +22,17 @@ in
|
||||
extraEntries = if config.boot.loader.grub.version == 2 then
|
||||
''
|
||||
menuentry "${memtest86.name}" {
|
||||
linux16 $bootRoot/memtest.bin
|
||||
linux16 @bootRoot@/memtest.bin
|
||||
}
|
||||
''
|
||||
else
|
||||
''
|
||||
menuentry "${memtest86.name}"
|
||||
linux16 $bootRoot/memtest.bin
|
||||
linux16 @bootRoot@/memtest.bin
|
||||
'';
|
||||
extraPrepareConfig =
|
||||
''
|
||||
cp ${memtest86}/memtest.bin /boot/memtest.bin;
|
||||
${pkgs.coreutils}/bin/cp ${memtest86}/memtest.bin /boot/memtest.bin;
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ let
|
||||
${pkgs.vmTools.startSamba}
|
||||
|
||||
# Start QEMU.
|
||||
# "-boot menu=on" is there, because I don't know how to make qemu boot from 2nd hd.
|
||||
exec ${pkgs.qemu_kvm}/bin/qemu-kvm \
|
||||
-name ${vmName} \
|
||||
-m ${toString config.virtualisation.memorySize} \
|
||||
@ -174,8 +175,9 @@ let
|
||||
-chardev socket,id=samba,path=./samba \
|
||||
-net user,vlan=0,guestfwd=tcp:10.0.2.4:445-chardev:samba''${QEMU_NET_OPTS:+,$QEMU_NET_OPTS} \
|
||||
${if cfg.useBootLoader then ''
|
||||
-drive index=0,file=$NIX_DISK_IMAGE,if=virtio,cache=writeback,werror=report \
|
||||
-drive index=1,file=${bootDisk}/disk.img,if=virtio,boot=on,readonly \
|
||||
-drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=virtio,cache=writeback,werror=report \
|
||||
-drive index=1,id=drive2,file=${bootDisk}/disk.img,if=virtio,readonly \
|
||||
-boot menu=on
|
||||
'' else ''
|
||||
-drive file=$NIX_DISK_IMAGE,if=virtio,cache=writeback,werror=report \
|
||||
-kernel ${config.system.build.toplevel}/kernel \
|
||||
|
Loading…
Reference in New Issue
Block a user