2009-06-11 09:51:27 +00:00
|
|
|
# This module contains the basic configuration for building a NixOS
|
|
|
|
# installation CD.
|
2009-06-05 15:10:15 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2009-11-10 21:42:38 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with lib;
|
2009-06-05 15:10:15 +00:00
|
|
|
|
|
|
|
{
|
2013-09-04 11:05:09 +00:00
|
|
|
imports =
|
2013-10-02 10:29:07 +00:00
|
|
|
[ ./channel.nix
|
2013-07-02 11:52:43 +00:00
|
|
|
./iso-image.nix
|
2010-09-25 09:32:43 +00:00
|
|
|
|
|
|
|
# Profiles of this basic installation CD.
|
2011-11-08 15:58:59 +00:00
|
|
|
../../profiles/all-hardware.nix
|
2010-09-25 09:32:27 +00:00
|
|
|
../../profiles/base.nix
|
2010-09-25 09:32:43 +00:00
|
|
|
../../profiles/installation-device.nix
|
2009-06-09 13:14:43 +00:00
|
|
|
];
|
2009-06-05 15:10:15 +00:00
|
|
|
|
2009-06-09 15:23:03 +00:00
|
|
|
# ISO naming.
|
2011-04-20 10:48:52 +00:00
|
|
|
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso";
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2014-06-05 20:51:43 +00:00
|
|
|
isoImage.volumeID = substring 0 11 "NIXOS_ISO";
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2013-03-02 19:02:32 +00:00
|
|
|
# Make the installer more likely to succeed in low memory
|
|
|
|
# environments. The kernel's overcommit heustistics bite us
|
|
|
|
# fairly often, preventing processes such as nix-worker or
|
|
|
|
# download-using-manifests.pl from forking even if there is
|
|
|
|
# plenty of free memory.
|
|
|
|
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
|
|
|
|
2009-06-09 13:27:50 +00:00
|
|
|
# To speed up installation a little bit, include the complete stdenv
|
2014-04-11 15:16:23 +00:00
|
|
|
# in the Nix store on the CD. Archive::Cpio is needed for the
|
|
|
|
# initrd builder.
|
|
|
|
isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ];
|
2013-10-02 10:29:07 +00:00
|
|
|
|
2013-11-01 15:29:36 +00:00
|
|
|
# EFI booting
|
|
|
|
isoImage.makeEfiBootable = true;
|
|
|
|
|
2013-10-02 10:29:07 +00:00
|
|
|
# Add Memtest86+ to the CD.
|
2014-01-21 16:25:49 +00:00
|
|
|
boot.loader.grub.memtest86.enable = true;
|
2013-11-01 15:29:36 +00:00
|
|
|
|
2014-05-21 10:04:08 +00:00
|
|
|
# Get a console as soon as the initrd loads fbcon on EFI boot.
|
2013-11-01 15:29:36 +00:00
|
|
|
boot.initrd.kernelModules = [ "fbcon" ];
|
2014-05-21 10:04:08 +00:00
|
|
|
|
2014-09-22 20:34:47 +00:00
|
|
|
# Add support for cow filesystems and their utilities
|
2014-11-12 14:32:21 +00:00
|
|
|
boot.supportedFilesystems = [ /* "zfs" */ "btrfs" ];
|
2014-09-22 20:34:47 +00:00
|
|
|
|
2014-05-21 10:04:08 +00:00
|
|
|
# Allow the user to log in as root without a password.
|
2014-11-03 11:30:54 +00:00
|
|
|
users.extraUsers.root.initialHashedPassword = "";
|
2009-06-05 15:10:15 +00:00
|
|
|
}
|