Skip to content

Image

Image

image.repart.compression.algorithm

Compression algorithm Type: one of "zstd", "xz"

Default

"zstd"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.compression.enable

Whether to enable Image compression. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.compression.level

Compression level. The available range depends on the used algorithm.

Type: signed integer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.imageFile

Filename of the image including all extensions (e.g image_1.raw or image_1.raw.zst).

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.imageFileBasename

Basename of the image filename without any extension (e.g. image_1).

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.mkfsOptions

Specify extra options for created file systems. The specified options are converted to individual environment variables of the format SYSTEMD_REPART_MKFS_OPTIONS_<FSTYPE>.

See upstream systemd documentation for information about the usage of these environment variables.

The example would produce the following environment variable:

SYSTEMD_REPART_MKFS_OPTIONS_VFAT="-S 512 -c"

Type: attribute set of list of string

Default

{ }

Example

{vfat = [ "-S 512" "-c" ];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.name

Name of the image.

If this option is unset but config.system.image.id is set, config.system.image.id is used as the default value.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.package

The systemd-repart package to use. Type: package

Default

pkgs.buildPackages.systemd

Example

pkgs.buildPackages.systemdMinimal.override { withCryptsetup = true; }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions

Specify partitions as a set of the names of the partitions with their configuration as the key.

Type: attribute set of (submodule)

Default

{ }

Example

{"10-esp" = {contents = {"/EFI/BOOT/BOOTX64.EFI".source ="${pkgs.systemd}/lib/systemd/boot/efi/systemd-bootx64.efi";}repartConfig = {Type = "esp";Format = "fat";};};"20-root" = {storePaths = [ config.system.build.toplevel ];repartConfig = {Type = "root";Format = "ext4";Minimize = "guess";};};};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions.<name>.contents

The contents to end up in the filesystem image. Type: attribute set of (submodule)

Default

{ }

Example

`#!nix { "/EFI/BOOT/BOOTX64.EFI".source = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-bootx64.efi";

"/loader/entries/nixos.conf".source = systemdBootEntry; } `

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions.<name>.contents.<name>.source

Path of the source file. Type: path

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions.<name>.repartConfig

Specify the repart options for a partiton as a structural setting. See https://www.freedesktop.org/software/systemd/man/repart.d.html for all available options.

Type: attribute set of (string or signed integer or boolean)

Example

{SizeMaxBytes = "2G";SizeMinBytes = "512M";Type = "home";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions.<name>.storePaths

The store paths to include in the partition. Type: list of path

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.partitions.<name>.stripNixStorePrefix

Whether to strip /nix/store/ from the store paths. This is useful when you want to build a partition that only contains store paths and is mounted under /nix/store.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.sectorSize

The sector size of the disk image produced by systemd-repart. This value must be a power of 2 between 512 and 4096.

Type: null or signed integer

Default

512

Example

4096

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.seed

A UUID to use as a seed. You can set this to null to explicitly randomize the partition UUIDs.

Type: null or string

Default

"0867da16-f251-457d-a9e8-c31f9a3c220b"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.split

Enables generation of split artifacts from partitions. If enabled, for each partition with SplitName= set, a separate output file containing just the contents of that partition is generated.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix

image.repart.version

Version of the image Type: null or string

Default

config.system.image.version

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/image/repart.nix