From 22ef2ba154e11aec324562a78b0a2656c6d39b72 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 7 Jul 2026 23:08:23 +0300 Subject: [PATCH] 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. --- nixos/modules/system/boot/loader/limine/limine-install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/limine/limine-install.py b/nixos/modules/system/boot/loader/limine/limine-install.py index 0ddbd8a9f29b..9add26b636c6 100644 --- a/nixos/modules/system/boot/loader/limine/limine-install.py +++ b/nixos/modules/system/boot/loader/limine/limine-install.py @@ -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)