Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

1.1 KiB

External Bootloader Backends

NixOS has support for several bootloader backends by default: systemd-boot, grub, uboot, etc. The built-in bootloader backend support is generic and supports most use cases. Some users may prefer to create advanced workflows around managing the bootloader and bootable entries.

You can replace the built-in bootloader support with your own tooling using the "external" bootloader option.

Imagine you have created a new package called FooBoot. FooBoot provides a program at ${pkgs.fooboot}/bin/fooboot-install which takes the system closure's path as its only argument and configures the system's bootloader.

You can enable FooBoot like this:

{ pkgs, ... }:
{
  boot.loader.external = {
    enable = true;
    installHook = "${pkgs.fooboot}/bin/fooboot-install";
  };
}

Developing Custom Bootloader Backends

Bootloaders should use RFC-0125's Bootspec format and synthesis tools to identify the key properties for bootable system generations.