forked from mirrors/nixpkgs
* Added an option boot.loader.grub.extraConfig to add commands to
grub.cfg before the menu entries. (This could also be done using `extraEntriesBeforeNixOS', but then you can't have entries *after* the main entry anymore.) * In the installer test, redirect GRUB output to the serial port. svn path=/nixos/branches/boot-order/; revision=22300
This commit is contained in:
parent
69c7175404
commit
a65b5ec81c
|
@ -216,6 +216,10 @@ extraEntries=`cat <<EOF
|
|||
EOF`
|
||||
|
||||
|
||||
cat >> $tmp <<EOF
|
||||
@extraConfig@
|
||||
EOF
|
||||
|
||||
if test -n "@extraEntriesBeforeNixOS@"; then
|
||||
echo "$extraEntries" >> $tmp
|
||||
fi
|
||||
|
|
|
@ -12,7 +12,8 @@ let
|
|||
inherit grub;
|
||||
inherit (pkgs) bash;
|
||||
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
||||
inherit (config.boot.loader.grub) copyKernels extraEntries extraEntriesBeforeNixOS
|
||||
inherit (config.boot.loader.grub) copyKernels
|
||||
extraConfig extraEntries extraEntriesBeforeNixOS
|
||||
splashImage configurationLimit version default timeout;
|
||||
};
|
||||
|
||||
|
@ -67,6 +68,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
example = "serial; terminal_output.serial";
|
||||
description = ''
|
||||
Additional GRUB commands inserted in the configuration file
|
||||
just before the menu entries.
|
||||
'';
|
||||
};
|
||||
|
||||
extraEntries = mkOption {
|
||||
default = "";
|
||||
example = ''
|
||||
|
|
|
@ -40,6 +40,7 @@ let
|
|||
|
||||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.extraConfig = "serial; terminal_output.serial";
|
||||
boot.initrd.kernelModules = [ "ext3" ];
|
||||
|
||||
fileSystems = [ ${fileSystems} ];
|
||||
|
|
Loading…
Reference in a new issue