Add an installation device profile, and use it it the basic installation CD.

svn path=/nixos/trunk/; revision=23912
This commit is contained in:
Nicolas Pierron 2010-09-25 09:32:43 +00:00
parent cf103b8d4d
commit 112cd0c4d4
2 changed files with 51 additions and 31 deletions

View file

@ -74,7 +74,10 @@ in
[ options
./memtest.nix
./iso-image.nix
# Profiles of this basic installation CD.
../../profiles/base.nix
../../profiles/installation-device.nix
# Enable devices which are usually scanned, because we don't know the
# target system.
@ -87,30 +90,10 @@ in
isoImage.volumeID = "NIXOS_INSTALL_CD_${config.system.nixosVersion}";
# Show the manual.
services.nixosManual.showManual = true;
# Let the user play Rogue on TTY 8 during the installation.
services.rogue.enable = true;
# Disable some other stuff we don't need.
security.sudo.enable = false;
# Include only the en_US locale. This saves 75 MiB or so compared to
# the full glibcLocales package.
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
# nixos-install will do a pull from this channel to speed up the
# installation.
installer.nixpkgsURL = http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable;
boot.postBootCommands =
''
export PATH=${pkgs.gnutar}/bin:${pkgs.bzip2}/bin:$PATH
# Provide a mount point for nixos-install.
mkdir -p /mnt
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
# for nixos-install.
${optionalString includeSources ''
@ -128,17 +111,6 @@ in
cp ${dummyConfiguration} /etc/nixos/configuration.nix
'';
# Some more help text.
services.mingetty.helpLine =
''
Log in as "root" with an empty password. ${
if config.services.xserver.enable then
"Type `start xserver' to start\nthe graphical user interface."
else ""
}
'';
# To speed up installation a little bit, include the complete stdenv
# in the Nix store on the CD.
isoImage.storeContents = [ pkgs.stdenv pkgs.klibc pkgs.klibcShrunk ];

View file

@ -0,0 +1,48 @@
{config, pkgs, ...}:
{
# Show the manual.
services.nixosManual.showManual = true;
# Let the user play Rogue on TTY 8 during the installation.
services.rogue.enable = true;
# Disable some other stuff we don't need.
security.sudo.enable = false;
# Include only the en_US locale. This saves 75 MiB or so compared to
# the full glibcLocales package.
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
# nixos-install will do a pull from this channel to speed up the
# installation.
installer.nixpkgsURL = http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable;
boot.postBootCommands =
''
# Provide a mount point for nixos-install.
mkdir -p /mnt
'';
# Some more help text.
services.mingetty.helpLine =
''
Log in as "root" with an empty password. ${
if config.services.xserver.enable then
"Type `start xserver' to start\nthe graphical user interface."
else ""
}
'';
# Allow sshd to be started manually through "start sshd". It should
# not be started by default on the installation CD because the
# default root password is empty.
services.openssh.enable = true;
jobs.sshd.startOn = pkgs.lib.mkOverride 50 "";
# Enable wpa_supplicant, but don't start it by default.
networking.enableWLAN = true;
jobs.wpa_supplicant.startOn = pkgs.lib.mkOverride 50 "";
}