NixOS bootspec v1 schema

Type: object

Bootspec is a set of memoized facts about a system's closure. The top-level object may contain arbitrary further keys ("extensions") whose semantics may be defined by third parties. The use of reverse-domain-name namespacing is recommended in order to avoid name collisions.

Type: object

Type: string

Nix store path to the stage-2 init, executed by initrd (if present).

Type: string

Nix store path to the kernel image.

Same definition as init

Type: array

List of kernel parameters

No Additional Items

Each item of this array must be:

Type: string

A kernel parameter in the form key[=value], e.g., loglevel=4 or quiet

Must match regular expression: ^[a-zA-Z0-9._-]+(=[^\s=]+)?$

Example:

[
    "amd_iommu=on",
    "amd_iommu=pt",
    "iommu=pt",
    "kvm.ignore_msrs=1",
    "kvm.report_ignored_msrs=0",
    "udev.log_priority=3",
    "systemd.unified_cgroup_hierarchy=1",
    "loglevel=4"
]

Type: string

A human-readable label for the system. It should contain the operating system, kernel version,and other user-relevant information to identify the system. This corresponds loosely to config.system.nixos.label.


Example:

"NixOS 21.11.20210810.dirty (Linux 5.15.30)"

Type: string

Nix system type the bootspec is intended for.


Examples:

"x86_64-linux"
"aarch64-linux"

Type: string

Top-level Nix store path of the system closure.

Same definition as init

Type: string

Nix store path to the initrd.

Same definition as init

Type: string

Nix store path to a tool that dynamically adds secrets to initrd. Consumers of a bootspec document should copy the file referenced by the initrd key to a writable location, ensure that the file is writable, invoke this tool with the path to the initrd as its only argument, and use the initrd as modified by the tool for booting. This may be used to add files from outside the Nix store to the initrd. This tool is expected to run on the system whose boot specification is being set up, and may thus fail if used on a system where the expected stateful files are not in place or whose CPU does not support the instruction set of the system to be booted. If this field is present and the tool fails, no boot configuration should be generated for the system.

Same definition as init

Type: object

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^.*$
Type: object

Additional Properties of any type are allowed.

Type: object

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^.*$
Type: object

Additional top-level specialisations