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