Skip to content

Loader

boot.loader.efi.canTouchEfiVariables

Whether the installation process is allowed to modify EFI boot variables. Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/efi.nix

boot.loader.efi.efiSysMountPoint

Where the EFI System Partition is mounted. Type: string

Default

"/boot"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/efi.nix

boot.loader.external.enable

Whether to enable using an external tool to install your bootloader. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/external/external.nix

boot.loader.external.installHook

The full path to a program of your choosing which performs the bootloader installation process.

The program will be called with an argument pointing to the output of the system's toplevel.

Type: path

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/external/external.nix

boot.loader.generationsDir.copyKernels

Whether copy the necessary boot files into /boot, so /nix/store is not needed by the boot loader.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix

boot.loader.generationsDir.enable

Whether to create symlinks to the system generations under /boot. When enabled, /boot/default/kernel, /boot/default/initrd, etc., are updated to point to the current generation's kernel image, initial RAM disk, and other bootstrap files.

This optional is not necessary with boot loaders such as GNU GRUB for which the menu is updated to point to the latest bootstrap files. However, it is needed for U-Boot on platforms where the boot command line is stored in flash memory rather than in a menu file.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix

boot.loader.generic-extlinux-compatible.configurationLimit

Maximum number of configurations in the boot menu.

Type: signed integer

Default

20

Example

10

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generic-extlinux-compatible

boot.loader.generic-extlinux-compatible.enable

Whether to generate an extlinux-compatible configuration file under /boot/extlinux.conf. For instance, U-Boot's generic distro boot support uses this file format.

See U-boot's documentation for more information.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generic-extlinux-compatible

boot.loader.generic-extlinux-compatible.populateCmd

Contains the builder command used to populate an image, honoring all options except the -c <path-to-default-configuration> argument. Useful to have for sdImage.populateRootCommands

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generic-extlinux-compatible

boot.loader.generic-extlinux-compatible.useGenerationDeviceTree

Whether to generate Device Tree-related directives in the extlinux configuration.

When enabled, the bootloader will attempt to load the device tree binaries from the generation's kernel.

Note that this affects all generations, regardless of the setting value used in their configurations.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/generic-extlinux-compatible

boot.loader.grub.backgroundColor

Background color to be used for GRUB to fill the areas the image isn't filling.

Type: null or string

Default

null

Example

"#7EBAE4"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.configurationLimit

Maximum of configurations in boot menu. GRUB has problems when there are too many entries.

Type: signed integer

Default

100

Example

120

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.configurationName

GRUB entry name instead of default.

Type: string

Default

""

Example

"Stable 2.6.21"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.copyKernels

Whether the GRUB menu builder should copy kernels and initial ramdisks to /boot. This is done automatically if /boot is on a different partition than /.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.default

Index of the default menu item to be booted. Can also be set to "saved", which will make GRUB select the menu item that was used at the last boot.

Type: signed integer or string

Default

"0"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.device

The device on which the GRUB boot loader will be installed. The special value nodev means that a GRUB boot menu will be generated, but GRUB itself will not actually be installed. To install GRUB on multiple devices, use boot.loader.grub.devices.

Type: string

Default

""

Example

"/dev/disk/by-id/wwn-0x500001234567890a"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.devices

The devices on which the boot loader, GRUB, will be installed. Can be used instead of device to install GRUB onto multiple devices.

Type: list of string

Default

[ ]

Example

["/dev/disk/by-id/wwn-0x500001234567890a"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.efiInstallAsRemovable

Whether to invoke grub-install with --removable.

Unless you turn this on, GRUB will install itself somewhere in boot.loader.efi.efiSysMountPoint (exactly where depends on other config variables). If you've set boot.loader.efi.canTouchEfiVariables AND you are currently booted in UEFI mode, then GRUB will use efibootmgr to modify the boot order in the EFI variables of your firmware to include this location. If you are not booted in UEFI mode at the time GRUB is being installed, the NVRAM will not be modified, and your system will not find GRUB at boot time. However, GRUB will still return success so you may miss the warning that gets printed ("efibootmgr: EFI variables are not supported on this system.").

If you turn this feature on, GRUB will install itself in a special location within efiSysMountPoint (namely EFI/boot/boot$arch.efi) which the firmwares are hardcoded to try first, regardless of NVRAM EFI variables.

To summarize, turn this on if: - You are installing NixOS and want it to boot in UEFI mode, but you are currently booted in legacy mode - You want to make a drive that will boot regardless of the NVRAM state of the computer (like a USB "removable" drive) - You simply dislike the idea of depending on NVRAM state to make your drive bootable

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.efiSupport

Whether GRUB should be built with EFI support.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.enable

Whether to enable the GNU GRUB boot loader.

Type: boolean

Default

!config.boot.isContainer

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.enableCryptodisk

Enable support for encrypted partitions. GRUB should automatically unlock the correct encrypted partition and look for filesystems.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.entryOptions

Options applied to the primary NixOS menu entry.

Type: null or string

Default

"--class nixos --unrestricted"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraConfig

Additional GRUB commands inserted in the configuration file just before the menu entries.

Type: strings concatenated with "\n"

Default

""

Example

'' serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal_input --append serial terminal_output --append serial''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraEntries

Any additional entries you want added to the GRUB boot menu.

Type: strings concatenated with "\n"

Default

""

Example

`#!nix '' # GRUB 2 example menuentry "Windows 7" { chainloader (hd0,4)+1 }

# GRUB 2 with UEFI example, chainloading another distro menuentry "Fedora" { set root=(hd1,1) chainloader /efi/fedora/grubx64.efi } ''`

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraEntriesBeforeNixOS

Whether extraEntries are included before the default option.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraFiles

A set of files to be copied to {file}/boot. Each attribute name denotes the destination file name in {file}/boot, while the corresponding attribute value specifies the source file.

Type: attribute set of path

Default

{ }

Example

{ "memtest.bin" = "${pkgs.memtest86plus}/memtest.bin"; }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraGrubInstallArgs

Additional arguments passed to grub-install.

A use case for this is to build specific GRUB2 modules directly into the GRUB2 kernel image, so that they are available and activated even in the grub rescue shell.

They are also necessary when the BIOS/UEFI is bugged and cannot correctly read large disks (e.g. above 2 TB), so GRUB2's own nativedisk and related modules can be used to use its own disk drivers. The example shows one such case. This is also useful for booting from USB. See the GRUB source code for which disk modules are available.

The list elements are passed directly as argv arguments to the grub-install program, in order.

Type: list of string

Default

[ ]

Example

["--modules=nativedisk ahci pata part_gpt part_msdos diskfilter mdraid1x lvm ext2"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraInstallCommands

Additional shell commands inserted in the bootloader installer script after generating menu entries.

Type: strings concatenated with "\n"

Default

""

Example

'' # the example below generates detached signatures that GRUB can verify # https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures ''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete old_gpg_home=$GNUPGHOME export GNUPGHOME="$(mktemp -d)" ''${pkgs.gnupg}/bin/gpg --import ''${priv_key} > /dev/null 2>&1 ''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -exec ''${pkgs.gnupg}/bin/gpg --detach-sign "{}" \; > /dev/null 2>&1 rm -rf $GNUPGHOME export GNUPGHOME=$old_gpg_home''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraPerEntryConfig

Additional GRUB commands inserted in the configuration file at the start of each NixOS menu entry.

Type: strings concatenated with "\n"

Default

""

Example

"root (hd0)"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.extraPrepareConfig

Additional bash commands to be run at the script that prepares the GRUB menu entries.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.font

Path to a TrueType, OpenType, or pf2 font to be used by Grub.

Type: null or path

Default

"${pkgs.grub2}/share/grub/unicode.pf2"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.fontSize

Font size for the grub menu. Ignored unless font is set to a ttf or otf font.

Type: null or signed integer

Default

null

Example

16

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.forceInstall

Whether to try and forcibly install GRUB even if problems are detected. It is not recommended to enable this unless you know what you are doing.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.forcei686

Whether to force the use of a ia32 boot loader on x64 systems. Required to install and run NixOS on 64bit x86 systems with 32bit (U)EFI.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.fsIdentifier

Determines how GRUB will identify devices when generating the configuration file. A value of uuid / label signifies that grub will always resolve the uuid or label of the device before using it in the configuration. A value of provided means that GRUB will use the device name as show in {command}df or {command}mount. Note, zfs zpools / datasets are ignored and will always be mounted using their labels.

Type: one of "uuid", "label", "provided"

Default

"uuid"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.gfxmodeBios

The gfxmode to pass to GRUB when loading a graphical boot interface under BIOS.

Type: string

Default

"1024x768"

Example

"auto"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.gfxmodeEfi

The gfxmode to pass to GRUB when loading a graphical boot interface under EFI.

Type: string

Default

"auto"

Example

"1024x768"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.gfxpayloadBios

The gfxpayload to pass to GRUB when loading a graphical boot interface under BIOS.

Type: string

Default

"text"

Example

"keep"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.gfxpayloadEfi

The gfxpayload to pass to GRUB when loading a graphical boot interface under EFI.

Type: string

Default

"keep"

Example

"text"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.ipxe

Set of iPXE scripts available for booting from the GRUB boot menu.

Type: attribute set of (path or string)

Default

{ }

Example

{ demo = '' #!ipxe dhcp chain http://boot.ipxe.org/demo/boot.php '';}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/ipxe.nix

boot.loader.grub.memtest86.enable

Make Memtest86+, a memory testing program, available from the GRUB boot menu.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/memtest.nix

boot.loader.grub.memtest86.params

Parameters added to the Memtest86+ command line. As of memtest86+ 5.01 the following list of (apparently undocumented) parameters are accepted:

  • console=..., set up a serial console. Examples: console=ttyS0, console=ttyS0,9600 or console=ttyS0,115200n8.

  • btrace, enable boot trace.

  • maxcpus=N, limit number of CPUs.

  • onepass, run one pass and exit if there are no errors.

  • tstlist=..., list of tests to run. Example: 0,1,2.

  • cpumask=..., set a CPU mask, to select CPUs to use for testing.

This list of command line options was obtained by reading the Memtest86+ source code.

Type: list of string

Default

[ ]

Example

["console=ttyS0,115200"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/memtest.nix

boot.loader.grub.mirroredBoots

Mirror the boot configuration to multiple partitions and install grub to the respective devices corresponding to those partitions.

Type: list of (submodule)

Default

[ ]

Example

[{devices = ["/dev/disk/by-id/wwn-0x500001234567890a"];path = "/boot1";}{devices = ["/dev/disk/by-id/wwn-0x500009876543210a"];path = "/boot2";}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.mirroredBoots.*.devices

The path to the devices which will have the GRUB MBR written. Note these are typically device paths and not paths to partitions.

Type: list of string

Default

[ ]

Example

["/dev/disk/by-id/wwn-0x500001234567890a""/dev/disk/by-id/wwn-0x500009876543210a"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.mirroredBoots.*.efiBootloaderId

The id of the bootloader to store in efi nvram. The default is to name it NixOS and append the path or efiSysMountPoint. This is only used if boot.loader.efi.canTouchEfiVariables is true.

Type: null or string

Default

null

Example

"NixOS-fsid"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.mirroredBoots.*.efiSysMountPoint

The path to the efi system mount point. Usually this is the same partition as the above path and can be left as null.

Type: null or string

Default

null

Example

"/boot1/efi"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.mirroredBoots.*.path

The path to the boot directory where GRUB will be written. Generally this boot path should double as an EFI path.

Type: string

Example

"/boot1"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.splashImage

Background image used for GRUB. Set to null to run GRUB in text mode.

::: {.note} File must be one of .png, .tga, .jpg, or .jpeg. JPEG images must not be progressive. The image will be scaled if necessary to fit the screen. :::

Type: null or path

Example

./my-background.png

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.splashMode

Whether to stretch the image or show the image in the top-left corner unstretched.

Type: one of "normal", "stretch"

Default

"stretch"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.storePath

Path to the Nix store when looking for kernels at boot. Only makes sense when copyKernels is false.

Type: string

Default

"/nix/store"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.subEntryOptions

Options applied to the secondary NixOS submenu entry.

Type: null or string

Default

"--class nixos"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.theme

Path to the grub theme to be used.

Type: null or path

Default

null

Example

"${pkgs.libsForQt5.breeze-grub}/grub/themes/breeze"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.timeoutStyle

  • menu shows the menu.
  • countdown uses a text-mode countdown.
  • hidden hides GRUB entirely.

When using a theme, the default value (menu) is appropriate for the graphical countdown.

When attempting to do flicker-free boot, hidden should be used.

See the GRUB documentation section about timeout_style.

::: {.note} If this option is set to ‘countdown’ or ‘hidden’ [...] and ESC or F4 are pressed, or SHIFT is held down during that time, it will display the menu and wait for input. :::

From: Simple configuration handling page, under GRUB_TIMEOUT_STYLE.

Type: one of "menu", "countdown", "hidden"

Default

"menu"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.useOSProber

If set to true, append entries for other OSs detected by os-prober.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.users

User accounts for GRUB. When specified, the GRUB command line and all boot options except the default are password-protected. All passwords and hashes provided will be stored in /boot/grub/grub.cfg, and will be visible to any local user who can read this file. Additionally, any passwords and hashes provided directly in a Nix configuration (as opposed to external files) will be copied into the Nix store, and will be visible to all local users.

Type: attribute set of (submodule)

Default

{ }

Example

{root = {hashedPasswordFile = "/path/to/file";};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.users.<name>.hashedPassword

Specifies the password hash for the account, generated with grub-mkpasswd-pbkdf2. This hash will be copied to the Nix store, and will be visible to all local users.

Type: null or string

Default

null

Example

"grub.pbkdf2.sha512.10000.674DFFDEF76E13EA...2CC972B102CF4355"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.users.<name>.hashedPasswordFile

Specifies the path to a file containing the password hash for the account, generated with grub-mkpasswd-pbkdf2. This hash will be stored in /boot/grub/grub.cfg, and will be visible to any local user who can read this file.

Type: null or string

Default

null

Example

"/path/to/file"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.users.<name>.password

Specifies the clear text password for the account. This password will be copied to the Nix store, and will be visible to all local users.

Type: null or string

Default

null

Example

"Pa$$w0rd!"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.users.<name>.passwordFile

Specifies the path to a file containing the clear text password for the account. This password will be stored in /boot/grub/grub.cfg, and will be visible to any local user who can read this file.

Type: null or string

Default

null

Example

"/path/to/file"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.grub.zfsSupport

Whether GRUB should be built against libzfs.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix

boot.loader.initScript.enable

Some systems require a /sbin/init script which is started. Or having it makes starting NixOS easier. This applies to some kind of hosting services and user mode linux.

Additionally this script will create /boot/init-other-configurations-contents.txt containing contents of remaining configurations. You can copy paste them into /sbin/init manually running a rescue system or such.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/init-script/init-script.nix

boot.loader.raspberryPi.enable

Whether to create files with the system generations in /boot. /boot/old will hold files from old generations.

::: {.note} These options are deprecated, unsupported, and may not work like expected. :::

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix

boot.loader.raspberryPi.firmwareConfig

Extra options that will be appended to /boot/config.txt file. For possible values, see: https://www.raspberrypi.com/documentation/computers/config_txt.html

::: {.note} These options are deprecated, unsupported, and may not work like expected. :::

Type: null or strings concatenated with "\n"

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix

boot.loader.raspberryPi.uboot.configurationLimit

Maximum number of configurations in the boot menu.

::: {.note} These options are deprecated, unsupported, and may not work like expected. :::

Type: signed integer

Default

20

Example

10

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix

boot.loader.raspberryPi.uboot.enable

Enable using uboot as bootmanager for the raspberry pi.

::: {.note} These options are deprecated, unsupported, and may not work like expected. :::

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix

boot.loader.raspberryPi.version

Type: one of 0, 1, 2, 3, 4

Default

2

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix

boot.loader.systemd-boot.configurationLimit

Maximum number of latest generations in the boot menu. Useful to prevent boot partition running out of disk space.

null means no limit i.e. all generations that have not been garbage collected yet.

Type: null or signed integer

Default

null

Example

120

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.consoleMode

The resolution of the console. The following values are valid:

  • "0": Standard UEFI 80x25 mode
  • "1": 80x50 mode, not supported by all devices
  • "2": The first non-standard mode provided by the device firmware, if any
  • "auto": Pick a suitable mode automatically using heuristics
  • "max": Pick the highest-numbered available mode
  • "keep": Keep the mode selected by firmware (the default)

Type: one of "0", "1", "2", "auto", "max", "keep"

Default

"keep"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.editor

Whether to allow editing the kernel command-line before boot. It is recommended to set this to false, as it allows gaining root access by passing init=/bin/sh as a kernel parameter. However, it is enabled by default for backwards compatibility.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.enable

Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager. For more information about systemd-boot: https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.extraEntries

Any additional entries you want added to the systemd-boot menu. These entries will be copied to {file}$BOOT/loader/entries. Each attribute name denotes the destination file name, and the corresponding attribute value is the contents of the entry.

To control the ordering of the entry in the boot menu, use the sort-key field, see https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting and {option}boot.loader.systemd-boot.sortKey.

Type: attribute set of strings concatenated with "\n"

Default

{ }

Example

{ "memtest86.conf" = '' title Memtest86+ efi /efi/memtest86/memtest.efi sort-key z_memtest''; }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.extraFiles

A set of files to be copied to {file}$BOOT. Each attribute name denotes the destination file name in {file}$BOOT, while the corresponding attribute value specifies the source file.

Type: attribute set of path

Default

{ }

Example

{ "efi/memtest86/memtest.efi" = "${pkgs.memtest86plus}/memtest.efi"; }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.extraInstallCommands

Additional shell commands inserted in the bootloader installer script after generating menu entries. It can be used to expand on extra boot entries that cannot incorporate certain pieces of information (such as the resulting init= kernel parameter).

Type: strings concatenated with "\n"

Default

""

Example

'' default_cfg=$(cat /boot/loader/loader.conf | grep default | awk '{print $2}') init_value=$(cat /boot/loader/entries/$default_cfg | grep init= | awk '{print $2}') sed -i "s|@INIT@|$init_value|g" /boot/custom/config_with_placeholder.conf''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.graceful

Invoke bootctl install with the --graceful option, which ignores errors when EFI variables cannot be written or when the EFI System Partition cannot be found. Currently only applies to random seed operations.

Only enable this option if systemd-boot otherwise fails to install, as the scope or implication of the --graceful option may change in the future.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.memtest86.enable

Make Memtest86+ available from the systemd-boot menu. Memtest86+ is a program for testing memory.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.memtest86.sortKey

systemd-boot orders the menu entries by their sort keys, so if you want something to appear after all the NixOS entries, it should start with {file}o or onwards.

See also {option}boot.loader.systemd-boot.sortKey.

Type: string

Default

"o_memtest86"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.netbootxyz.enable

Make netboot.xyz available from the systemd-boot menu. netboot.xyz is a menu system that allows you to boot OS installers and utilities over the network.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.netbootxyz.sortKey

systemd-boot orders the menu entries by their sort keys, so if you want something to appear after all the NixOS entries, it should start with {file}o or onwards.

See also {option}boot.loader.systemd-boot.sortKey.

Type: string

Default

"o_netbootxyz"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.sortKey

The sort key used for the NixOS bootloader entries. This key determines sorting relative to non-NixOS entries. See also https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting

This option can also be used to control the sorting of NixOS specialisations.

By default, specialisations inherit the sort key of their parent generation and will have the same value for both the sort-key and the version (i.e. the generation number), systemd-boot will therefore sort them based on their file name, meaning that in your boot menu you will have each main generation directly followed by its specialisations sorted alphabetically by their names.

If you want a different ordering for a specialisation, you can override its sort-key which will cause the specialisation to be uncoupled from its parent generation. It will then be sorted by its new sort-key just like any other boot entry.

The sort-key is stored in the generation's bootspec, which means that generations keep their sort-keys even if the original definition of the generation was removed from the NixOS configuration. It also means that updating the sort-key will only affect new generations, while old ones will keep the sort-key that they were originally built with.

Type: string

Default

"nixos"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.systemd-boot.xbootldrMountPoint

Where the XBOOTLDR partition is mounted.

If set, this partition will be used as $BOOT to store boot loader entries and extra files instead of the EFI partition. As per the bootloader specification, it is recommended that the EFI and XBOOTLDR partitions be mounted at /efi and /boot, respectively.

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

boot.loader.timeout

Timeout (in seconds) until loader boots the default menu item. Use null if the loader menu should be displayed indefinitely.

Type: null or signed integer

Default

5

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/system/boot/loader/loader.nix