nixos/iso-image: prepend to ISO menu labels
This commit is contained in:
parent
0ee5bb202b
commit
c281a355fe
|
@ -52,7 +52,7 @@ let
|
|||
buildMenuAdditionalParamsGrub2 = additional:
|
||||
let
|
||||
finalCfg = {
|
||||
name = "${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel}";
|
||||
name = "${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel}";
|
||||
params = "init=${config.system.build.toplevel}/init ${additional} ${toString config.boot.kernelParams}";
|
||||
image = "/boot/${config.system.boot.loader.kernelFile}";
|
||||
initrd = "/boot/initrd";
|
||||
|
@ -109,35 +109,35 @@ let
|
|||
DEFAULT boot
|
||||
|
||||
LABEL boot
|
||||
MENU LABEL ${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel}
|
||||
MENU LABEL ${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel}
|
||||
LINUX /boot/${config.system.boot.loader.kernelFile}
|
||||
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
|
||||
INITRD /boot/${config.system.boot.loader.initrdFile}
|
||||
|
||||
# A variant to boot with 'nomodeset'
|
||||
LABEL boot-nomodeset
|
||||
MENU LABEL ${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (nomodeset)
|
||||
MENU LABEL ${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (nomodeset)
|
||||
LINUX /boot/${config.system.boot.loader.kernelFile}
|
||||
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset
|
||||
INITRD /boot/${config.system.boot.loader.initrdFile}
|
||||
|
||||
# A variant to boot with 'copytoram'
|
||||
LABEL boot-copytoram
|
||||
MENU LABEL ${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (copytoram)
|
||||
MENU LABEL ${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (copytoram)
|
||||
LINUX /boot/${config.system.boot.loader.kernelFile}
|
||||
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} copytoram
|
||||
INITRD /boot/${config.system.boot.loader.initrdFile}
|
||||
|
||||
# A variant to boot with verbose logging to the console
|
||||
LABEL boot-debug
|
||||
MENU LABEL ${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (debug)
|
||||
MENU LABEL ${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (debug)
|
||||
LINUX /boot/${config.system.boot.loader.kernelFile}
|
||||
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} loglevel=7
|
||||
INITRD /boot/${config.system.boot.loader.initrdFile}
|
||||
|
||||
# A variant to boot with a serial console enabled
|
||||
LABEL boot-serial
|
||||
MENU LABEL ${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (serial console=ttyS0,115200n8)
|
||||
MENU LABEL ${config.isoImage.prependToMenuLabel}${config.system.nixos.distroName} ${config.system.nixos.label}${config.isoImage.appendToMenuLabel} (serial console=ttyS0,115200n8)
|
||||
LINUX /boot/${config.system.boot.loader.kernelFile}
|
||||
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} console=ttyS0,115200n8
|
||||
INITRD /boot/${config.system.boot.loader.initrdFile}
|
||||
|
@ -616,6 +616,18 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
isoImage.prependToMenuLabel = mkOption {
|
||||
default = "";
|
||||
example = "Install ";
|
||||
description = lib.mdDoc ''
|
||||
The string to prepend before the menu label for the NixOS system.
|
||||
This will be directly prepended (without whitespace) to the NixOS version
|
||||
string, like for example if it is set to `XXX`:
|
||||
|
||||
`XXXNixOS 99.99-pre666`
|
||||
'';
|
||||
};
|
||||
|
||||
isoImage.appendToMenuLabel = mkOption {
|
||||
default = " Installer";
|
||||
example = " Live System";
|
||||
|
|
Loading…
Reference in a new issue