about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub/grub.nix
diff options
context:
space:
mode:
authorSergey Lukjanov <me@slukjanov.name>2020-01-12 19:39:03 -0800
committerSergey Lukjanov <me@slukjanov.name>2020-02-03 15:37:00 -0800
commit7144b9ac5417c6e74af41fd3c6cad8e20ffc369c (patch)
tree64d9557e0de539ec45a0bde9762fe9be28c12235 /nixos/modules/system/boot/loader/grub/grub.nix
parentc636a45e67568398ae4795b7b084ec65878da3a4 (diff)
downloadnixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar.gz
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar.bz2
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar.lz
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar.xz
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.tar.zst
nixlib-7144b9ac5417c6e74af41fd3c6cad8e20ffc369c.zip
Fix boot.loader.grub.extraFiles when used with mirroredBoots
Substitute @bootPath@ in boot.loader.grub.extraPrepareConfig script
same way as it's done for boot.loader.grub.extraEntries option.
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/grub.nix')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 9a4db84f7b73..26c1197bf975 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -630,7 +630,7 @@ in
 
       boot.loader.grub.extraPrepareConfig =
         concatStrings (mapAttrsToList (n: v: ''
-          ${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}"
+          ${pkgs.coreutils}/bin/cp -pf "${v}" "@bootPath@/${n}"
         '') config.boot.loader.grub.extraFiles);
 
       assertions = [