Author: eelco Date: 2010-06-16 22:18:26 +0000 (Wed, 16 Jun 2010) New Revision: 22300
You can view the changes in this commit at: https://svn.nixos.org/viewvc/nix?rev=22300&view=rev Modified: nixos/branches/boot-order/modules/installer/grub/grub-menu-builder.sh nixos/branches/boot-order/modules/installer/grub/grub.nix nixos/branches/boot-order/tests/installer.nix Log: * 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. Changes: Modified: nixos/branches/boot-order/modules/installer/grub/grub-menu-builder.sh =================================================================== --- nixos/branches/boot-order/modules/installer/grub/grub-menu-builder.sh 2010-06-16 22:16:43 UTC (rev 22299) +++ nixos/branches/boot-order/modules/installer/grub/grub-menu-builder.sh 2010-06-16 22:18:26 UTC (rev 22300) @@ -216,6 +216,10 @@ EOF` +cat >> $tmp <<EOF +...@extraconfig@ +EOF + if test -n "@extraEntriesBeforeNixOS@"; then echo "$extraEntries" >> $tmp fi Modified: nixos/branches/boot-order/modules/installer/grub/grub.nix =================================================================== --- nixos/branches/boot-order/modules/installer/grub/grub.nix 2010-06-16 22:16:43 UTC (rev 22299) +++ nixos/branches/boot-order/modules/installer/grub/grub.nix 2010-06-16 22:18:26 UTC (rev 22300) @@ -12,7 +12,8 @@ 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 @@ ''; }; + 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 = '' Modified: nixos/branches/boot-order/tests/installer.nix =================================================================== --- nixos/branches/boot-order/tests/installer.nix 2010-06-16 22:16:43 UTC (rev 22299) +++ nixos/branches/boot-order/tests/installer.nix 2010-06-16 22:18:26 UTC (rev 22300) @@ -40,6 +40,7 @@ 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} ]; _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
