summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd/iso-image.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-06-28 23:26:54 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-06-28 23:30:17 +0200
commitf9bd72f24cfc8c160d144615522b0bc692cde9d0 (patch)
tree8c021e2bd89e4db8094d723fcac3fc8e76627262 /nixos/modules/installer/cd-dvd/iso-image.nix
parent88c7e4aa94b0241308dcc730f0c94ef3160c9300 (diff)
downloadnixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar.gz
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar.bz2
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar.lz
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar.xz
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.tar.zst
nixpkgs-f9bd72f24cfc8c160d144615522b0bc692cde9d0.zip
nixos/iso-image: Allow to customize menu label.
It comes in handy to alter the menu label if you're not building a NixOS
installer image but for example if you want to build a live system and
still want to re-use the iso-image.nix module.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/installer/cd-dvd/iso-image.nix')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index c546b8df474..0128fa9f33d 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -40,7 +40,7 @@ let
     DEFAULT boot
 
     LABEL boot
-    MENU LABEL NixOS ${config.system.nixosVersion} Installer
+    MENU LABEL NixOS ${config.system.nixosVersion}${config.isoImage.appendToMenuLabel}
     LINUX /boot/bzImage
     APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
     INITRD /boot/initrd
@@ -192,6 +192,18 @@ in
       '';
     };
 
+    isoImage.appendToMenuLabel = mkOption {
+      default = " Installer";
+      example = " Live System";
+      description = ''
+        The string to append after the menu label for the NixOS system.
+        This will be directly appended (without whitespace) to the NixOS version
+        string, like for example if it is set to <literal>XXX</literal>:
+
+        <para><literal>NixOS 99.99-pre666XXX</literal></para>
+      '';
+    };
+
   };
 
   config = {