1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-21 00:49:27 +03:00
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 nixos/binfmt: remove unused stringAfter 2023-12-29 03:41:45 +01:00
clevis.md nixos/clevis: clairify secret creation 2024-01-23 20:46:52 -08:00
clevis.nix nixos/clevis: init 2023-12-02 11:55:47 +00:00
emergency-mode.nix
grow-partition.nix nixos/growpart: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:09:59 -08:00
initrd-network.nix systemd-stage-1: Add assertions for unsupported options. 2023-10-30 12:15:58 +01:00
initrd-openvpn.nix systemd-initrd: OpenVPN 2023-04-17 16:41:35 -04:00
initrd-ssh.nix nixos/initrd-ssh: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:12:10 -08:00
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 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
kexec.nix
luksroot.nix systemd: 254.6 -> 255.2 2024-01-17 14:13:46 +01:00
modprobe.nix nixos/modprobe: fix typo in boot.modprobeConfig.enable documentation 2023-01-20 13:58:15 +01:00
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 nixos/plymouth: drop the X11 renderer in the initrd 2023-11-11 20:12:14 +01:00
resolved.nix nixos/resolved: add dnsovertls option 2024-01-19 21:29:22 -06:00
shutdown.nix
stage-1-init.sh nixos/stage-1.init.sh: only set 'IFS' in 'waitDevice' for bcachefs 2024-01-16 15:06:05 -06:00
stage-1.nix nixos/filesystems: make supportedFilesystems an attrset 2024-02-19 11:46:52 +01:00
stage-2-init.sh stage-2: don't write to /dev/kmsg if missing 2023-10-30 21:53:52 +01:00
stage-2.nix nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
stratisroot.nix minor refactoring 2023-05-19 10:22:45 -04:00
systemd.nix nixos/systemd: include systemd-boot-random-seed.service 2024-02-28 12:14:06 +01:00
timesyncd.nix systemd: disable NSCD when DNSSEC validation is disabled in timesyncd 2023-12-20 13:21:43 +02:00
tmp.nix nixos/tmp: add a note to useTmpfs on potential issues 2023-03-20 17:27:06 +01:00
uki.nix nixos/boot.uki: add tries option for automatic boot assessment 2024-02-16 11:31:40 +01:00
unl0kr.nix nixos/module: add boot.initrd.unl0kr 2023-10-16 21:33:02 +11:00
uvesafb.nix nixos/uvesafb: init 2022-10-23 11:47:11 -03:00