nixpkgs/nixos/modules/system/boot
r-vdp a8ab8b59a7
systemd-boot: introduce options to set a sort-key for systemd-boot entries
Without sort-keys specified on entries, the entries are sorted only by
file name (in decreasing order, so starting at the end of the alphabet!),
without taking any other fields into account (see
[the boot loader specification reference][1]).
Moreover, entries without a sort-key are always ordered after all
entries with a sort-key, so by not adding a sort-key to the NixOS ones,
we cannot add a sort-key to any other entry while keeping it below the
NixOS entries.

So currently we have options to set the file names for additional entries like
memtest and netbootxyz.
However, as mentioned above, the sorting by file name is not very intuitive and
actually sorts in the opposite order of what is currently mentioned in the option
descriptions.

With this commit, we set a configurable sort-key on all NixOS entries,
and add options for setting the sort-keys for the memtest and netbootxyz
entries.
The sorting by sort-key is more intuitive (it starts at the start of the
alphabet) and also takes into account the machine-id and version for entries
with identical sort-keys.

We use a bootspec extension to store the sort keys, which allows us to
redefine the sort key for individual specialisations without needing any
special casing.

[1]: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting
2024-03-02 02:11:32 +01:00
..
loader systemd-boot: introduce options to set a sort-key for systemd-boot entries 2024-03-02 02:11:32 +01:00
systemd substitute: Deprecate replacements, introduce replacementsList 2024-02-29 00:35:27 +01:00
binfmt.nix
clevis.md nixos/clevis: clairify secret creation 2024-01-23 20:46:52 -08:00
clevis.nix
emergency-mode.nix
grow-partition.nix
initrd-network.nix
initrd-openvpn.nix
initrd-ssh.nix
kernel.nix nixos/boot/kernel: add kernelPatches example of using kernel mailing list mbox url 2024-02-17 21:21:52 +11:00
kernel_config.nix
kexec.nix
luksroot.nix
modprobe.nix
networkd.nix nixos/networkd: accept true and false in addition to "yes" and "no" for DHCP= and LinkLocalAddressing= 2024-02-27 08:53:32 -08:00
pbkdf2-sha512.c
plymouth.nix
resolved.nix
shutdown.nix
stage-1-init.sh
stage-1.nix nixos/filesystems: make supportedFilesystems an attrset 2024-02-19 11:46:52 +01:00
stage-2-init.sh
stage-2.nix
stratisroot.nix
systemd.nix nixos/systemd: include systemd-boot-random-seed.service 2024-02-28 12:14:06 +01:00
timesyncd.nix
tmp.nix
uki.nix nixos/boot.uki: add tries option for automatic boot assessment 2024-02-16 11:31:40 +01:00
unl0kr.nix
uvesafb.nix