Skip to content

Commit

Permalink
iso-image: normalize volumeID
Browse files Browse the repository at this point in the history
The volumeID will now be in the format of:
nixos-$EDITON-$RELEASE-$ARCH

an example for the minimal image would look like:
nixos-minimal-20.09-x86-64-linux

(cherry picked from commit 70a8e9a)
  • Loading branch information
worldofpeace committed Apr 9, 2020
1 parent 84b906d commit 519ace8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 0 additions & 2 deletions nixos/modules/installer/cd-dvd/installation-cd-base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ with lib;
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";

isoImage.volumeID = substring 0 11 "NIXOS_ISO";

# EFI booting
isoImage.makeEfiBootable = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ with lib;
{
imports = [ ./installation-cd-graphical-base.nix ];

isoImage.edition = "gnome";

services.xserver.desktopManager.gnome3.enable = true;

# Auto-login as root.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ with lib;
{
imports = [ ./installation-cd-graphical-base.nix ];

isoImage.edition = "plasma5";

services.xserver = {
desktopManager.plasma5 = {
enable = true;
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
[ ./installation-cd-base.nix
];

isoImage.edition = "minimal";

fonts.fontconfig.enable = false;
}
11 changes: 10 additions & 1 deletion nixos/modules/installer/cd-dvd/iso-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,17 @@ in
'';
};

isoImage.edition = mkOption {
default = "";
description = ''
Specifies which edition string to use in the volume ID of the generated
ISO image.
'';
};

isoImage.volumeID = mkOption {
default = "NIXOS_BOOT_CD";
# nixos-$EDITION-$RELEASE-$ARCH
default = "nixos${optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"}-${config.system.nixos.release}-${pkgs.stdenv.hostPlatform.system}";
description = ''
Specifies the label or volume ID of the generated ISO image.
Note that the label is used by stage 1 of the boot process to
Expand Down

0 comments on commit 519ace8

Please sign in to comment.