From f12b216574f5dfd6f26a8be5b19661e89d92c983 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 6 Mar 2023 23:40:12 -0500 Subject: [PATCH] nixos/grub: Fix extraFiles in subdirectories This directly copies the systemd-boot logic, which works. `install` with `-D` will create all leading directory components. --- nixos/modules/system/boot/loader/grub/grub.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 8f2f578e3070..e0171a71da93 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -699,7 +699,7 @@ in boot.loader.grub.extraPrepareConfig = concatStrings (mapAttrsToList (n: v: '' - ${pkgs.coreutils}/bin/cp -pf "${v}" "@bootPath@/${n}" + ${pkgs.coreutils}/bin/install -Dp "${v}" "${efi.efiSysMountPoint}/"${escapeShellArg n} '') config.boot.loader.grub.extraFiles); assertions = [