Added option boot.extraGrubEntriesBeforeNixos=true/false to boot by default into nixos-default or into your extraGrubEntries

svn path=/nixos/trunk/; revision=12263
This commit is contained in:
Wouter den Breejen 2008-07-05 00:16:39 +00:00
parent 2c56d137ee
commit ab41596a7f
4 changed files with 21 additions and 10 deletions

View File

@ -11,6 +11,7 @@ fi
# Some aliases.
alias ls="ls --color=tty"
alias ll="ls -l"
alias l="ls -alh"
alias which="type -p"
# Help `rpcgen' find `cpp', assuming it's installed in the user's environment.

View File

@ -113,19 +113,22 @@ if test -n "@copyKernels@"; then
mkdir -p /boot/kernels
fi
# Additional entries specified verbatim by the configuration.
extraGrubEntries=$(cat >> $tmp <<EOF
@extraGrubEntries@
EOF)
if test -n "$tmp"; then
addEntry "NixOS - Default" $default ""
if test -n "@extraGrubEntriesBeforeNixos@"; then
$extraGrubEntries
fi
if test -n "$tmp"; then
addEntry "NixOS - Default" $default ""
fi
# Additional entries specified verbatim by the configuration.
cat >> $tmp <<EOF
@extraGrubEntries@
EOF
if test -n "@extraGrubEntriesBeforeNixos@"; then
$extraGrubEntries
fi
# Add all generations of the system profile to the menu, in reverse
# (most recent to least recent) order.

View File

@ -275,6 +275,13 @@
";
};
extraGrubEntriesBeforeNixos = mkOption {
default = false;
description = "
Wheter extraGrubEntries are put before the Nixos-default option
";
};
grubSplashImage = mkOption {
default = pkgs.fetchurl {
url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;

View File

@ -371,7 +371,7 @@ rec {
isExecutable = true;
inherit (pkgs) bash;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
inherit (config.boot) copyKernels extraGrubEntries
inherit (config.boot) copyKernels extraGrubEntries extraGrubEntriesBeforeNixos
grubSplashImage bootMount configurationLimit;
};