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:
parent
2c56d137ee
commit
ab41596a7f
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue