diff --git a/modules/installer/cd-dvd/installation-cd.nix b/modules/installer/cd-dvd/installation-cd.nix index 6c8c437e073..ca66a5b4728 100644 --- a/modules/installer/cd-dvd/installation-cd.nix +++ b/modules/installer/cd-dvd/installation-cd.nix @@ -126,9 +126,18 @@ in chown -R root.root /etc/nixos ''; + # Some more help text. services.mingetty.helpLine = '' Log in as "root" with an empty password. ''; + + # To speed up installation a little bit, include the complete stdenv + # in the Nix store on the CD. + isoImage.storeContents = + [ { object = pkgs.stdenv; + symlink = "none"; + } + ]; } diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix index cec42c24933..65abf4c18c4 100644 --- a/modules/installer/cd-dvd/iso-image.nix +++ b/modules/installer/cd-dvd/iso-image.nix @@ -15,8 +15,20 @@ let } ]; description = '' - This option lists files that have to be copied to fixed - locations in the generated ISO image. + This option lists files to be copied to fixed locations in the + generated ISO image. + ''; + }; + + isoImage.storeContents = pkgs.lib.mkOption { + example = + [ { object = pkgs.stdenv; + symlink = "/stdenv"; + } + ]; + description = '' + This option lists additional derivations to be included in the + Nix store in the generated ISO image. ''; }; @@ -77,6 +89,17 @@ in } ]; + # Closures to be copied to the Nix store on the CD, namely the init + # script and the top-level system configuration directory. + isoImage.storeContents = + [ { object = config.system.build.bootStage2; + symlink = "/init"; + } + { object = config.system.build.system; + symlink = "/system"; + } + ]; + # The Grub menu. boot.extraGrubEntries = '' @@ -101,18 +124,8 @@ in volumeID = cdLabel; - # Single files to be copied to fixed locations on the CD. contents = config.isoImage.contents; - - # Closures to be copied to the Nix store on the CD. - storeContents = - [ { object = config.system.build.bootStage2; - symlink = "/init"; - } - { object = config.system.build.system; - symlink = "/system"; - } - ]; + storeContents = config.isoImage.storeContents; }; # After booting, register the contents of the Nix store on the CD in