Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Models

NixOS-Compose relies on quite a few models along its process.

Most of them are designed for store or communicate the state of various steps.

Description

The Description model is common to Composition & Deployment models.

It contains data for each node, specifically on how it boots (initrd, kernel, stage1, qemu_script (if any), …).

It is mostly contained within a dictionary in each parent model. It most situations, it is contained within a "all" key, representing the all-in-one image.

Note

An all-in-one image is a nix built image containing all machines in your composition. It can become quite heavy in some situations, as it contains all data for all machines at once.

The machine / node will know which boot on based on its role & ip address.

Flavour

The Flavour model is an extract of a flavour description, as described in the flavour documentation.

Composition info

This is the main model. Composition is first built by Nix, and gradually completed by NixOS-Compose during the build process.

It is also used for creating the Deployment model later, for starting the Driver.

Deployment info

This is the output of the start/driver process. It is partially created from the Composition model.

It describes the nodes / machines, roles, test_script, ssh keys & all other information required for running the driver.

The machines may be receiving this file for self-configuring.

NXC file

This model is used for configuring your composition, based on your needs.

Tip

This model is constructed from a file read at the root of your composition flake, the file must be named nxc.json.

You can find various examples in the examples directory.