1 # This module contains the basic configuration for building a NixOS
3 { config, lib, options, pkgs, ... }:
8 # Profiles of this basic installation CD.
9 ../../profiles/all-hardware.nix
10 ../../profiles/base.nix
11 ../../profiles/installation-device.nix
14 # Adds terminus_font for people with HiDPI displays
15 console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
18 isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
21 isoImage.makeEfiBootable = true;
24 isoImage.makeUsbBootable = true;
26 # Add Memtest86+ to the CD.
27 boot.loader.grub.memtest86.enable = true;
29 # An installation media cannot tolerate a host config defined file
30 # system layout on a fresh machine, before it has been formatted.
31 swapDevices = lib.mkImageMediaOverride [ ];
32 fileSystems = lib.mkImageMediaOverride config.lib.isoFileSystems;
34 boot.postBootCommands = ''
35 for o in $(</proc/cmdline); do
38 set -- $(IFS==; echo $o)
39 echo "nixos:$2" | ${pkgs.shadow}/bin/chpasswd
45 system.stateVersion = lib.mkDefault lib.trivial.release;