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/base.nix
10 ../../profiles/installation-device.nix
13 hardware.enableAllHardware = true;
15 # Adds terminus_font for people with HiDPI displays
16 console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
19 isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
22 isoImage.makeEfiBootable = true;
25 isoImage.makeUsbBootable = true;
27 # Add Memtest86+ to the CD.
28 boot.loader.grub.memtest86.enable = true;
30 # An installation media cannot tolerate a host config defined file
31 # system layout on a fresh machine, before it has been formatted.
32 swapDevices = lib.mkImageMediaOverride [ ];
33 fileSystems = lib.mkImageMediaOverride config.lib.isoFileSystems;
35 boot.postBootCommands = ''
36 for o in $(</proc/cmdline); do
39 set -- $(IFS==; echo $o)
40 echo "nixos:$2" | ${pkgs.shadow}/bin/chpasswd
46 environment.defaultPackages = with pkgs; [
50 programs.git.enable = lib.mkDefault true;
52 system.stateVersion = lib.mkDefault lib.trivial.release;