What ISO modules provide
These modules configure NixOS installation ISOs with sensible defaults for installation environments. They optimize for size, boot speed, and include essential tools while stripping unnecessary components.Optimized boot
Fast boot with kernel parameters and filesystem support
Minimal size
Space-saving configurations to reduce ISO size
Installation tools
nixos-install, nixos-enter, and custom installers
Network ready
SSH and networking configured for headless installs
Module breakdown
image.nix - ISO image configuration
Configures the ISO image format, compression, and contents.Configuration details
Configuration details
Creates consistently named ISOs with the format: Key features:
hostname-release-rev-arch.isomodules/iso/image.nix
- Maximum zstd compression (level 19)
- Includes flake source at
/flakefor offline installation - Automatic naming based on hostname, release, and git revision
- No “-installer” suffix in boot menu labels
boot.nix - Boot configuration
Configures kernel parameters and boot settings for the live environment.Configuration details
Configuration details
modules/iso/boot.nix
toram parameter loads the entire ISO into memory, allowing you to remove the USB drive after boot.nix.nix - Nix package manager settings
Configures Nix for the installation environment with optimal settings.Configuration details
Configuration details
modules/iso/nix.nix
programs.nix - Installation programs
Includes only essential installation tools.Configuration details
Configuration details
modules/iso/programs.nix
networking.nix - Network access
Enables SSH for headless installations.Configuration details
Configuration details
modules/iso/networking.nix
space.nix - Size optimizations
Reduces ISO size by disabling documentation.Configuration details
Configuration details
modules/iso/space.nix
console.nix - TTY configuration
Configures the text console appearance.Configuration details
Configuration details
modules/iso/console.nix
Other modules
fixes.nix - System fixes
fixes.nix - System fixes
Contains workarounds for common issues in the ISO environment.
nixpkgs.nix - Nixpkgs settings
nixpkgs.nix - Nixpkgs settings
Nixpkgs-specific configuration like allowing unfree packages.
Usage example
The lilith system uses the ISO module to build installation media:systems/default.nix
class = "iso" setting automatically imports all ISO modules through the class module system, which loads modules/iso/default.nix.
Building an ISO
Build the lilith ISO with:result/iso/ with a name like:
Key features
Embedded flake source
The ISO includes the complete flake source at/flake, so you can install without internet access or cloning the repository:
Minimal footprint
Aggressive optimization keeps ISO size small:- No documentation or man pages
- Minimal package set
- Maximum compression
- No nixpkgs channel
Live environment defaults
The NixOS ISO profile provides two users by default:nixos- No passwordroot- No password
Headless installation support
SSH is enabled by default with authorized keys for root, allowing remote installations without physical access to the machine.Next steps
NixOS modules
System configuration for installed systems
Base modules
Shared configuration across platforms