nixos/limine: fix location for boot.loader.limine.additionalFiles

The documentation describes this as a set of files copied to /boot, with
the attribute name denoting the destination file name in /boot.

This uses essentially the same description as refind, systemd-boot and
grub. However limine put it into limine_install_dir (/boot/limine by
default) by accident, which broke downstream users.

For example, nixos-apple-silicon uses boot.loader.limine.additionalFiles
(and similar directives for other bootloaders) to update its m1n1
bootloader (which chainloads into u-boot, which chainloads into the
bootloader selected in NixOS), and due to this bug, put new versions of
it in the wrong location, effectively never updating m1n1.

Fix this, by updating the location. The next commit adds a regression VM
test for it.
This commit is contained in:
Florian Klink
2026-07-07 23:08:23 +03:00
parent 266a3597f5
commit 22ef2ba154
@@ -621,7 +621,7 @@ def install_bootloader() -> None:
paths[config_file_path] = True
for dest_path, source_path in config("additionalFiles").items():
dest_path = os.path.join(limine_install_dir, dest_path)
dest_path = os.path.join(str(config("efiMountPoint")), dest_path)
copy_file(source_path, dest_path)