MyNixOS website logo
option

boot.initrd.compressor

The compressor to use on the initrd image. May be any of:

  • The name of one of the predefined compressors, see pkgs/build-support/kernel/initrd-compressor-meta.nix for the definitions.
  • A function which, given the nixpkgs package set, returns the path to a compressor tool, e.g. pkgs: "${pkgs.pigz}/bin/pigz"
  • (not recommended, because it does not work when cross-compiling) the full path to a compressor tool, e.g. "${pkgs.pigz}/bin/pigz"

The given program should read data from stdin and write it to stdout compressed.

Declarations
Type
string or function that evaluates to a(n) string
Default
{
  _type = "literalMD";
  text = "`zstd` if the kernel supports it (5.9+), `gzip` if not";
}
Example
"xz"