summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-05-22 17:07:36 -0400
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-22 20:04:05 -0700
commitc9bb054dd68964b0eb9a38c51bdf824bfb212fc7 (patch)
treefa96ef98be1056537a4482c8bfc6270e6ee38942 /nixos/modules/installer/cd-dvd
parent15eaed0718515db3f2fa7d4ed71676e6069d3fb5 (diff)
downloadnixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar.gz
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar.bz2
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar.lz
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar.xz
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.tar.zst
nixpkgs-c9bb054dd68964b0eb9a38c51bdf824bfb212fc7.zip
iso-image: unqualified root → ($root)
This technically changes nothing. In practice `$root` is always the
"CWD", whether searched for automatically or not.

But this serves to announce we are relying on `$root`... I guess...
Diffstat (limited to 'nixos/modules/installer/cd-dvd')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index be5db40e537..321a03a0f0c 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -201,7 +201,7 @@ let
 
     # Fonts can be loaded?
     # (This font is assumed to always be provided as a fallback by NixOS)
-    if loadfont /EFI/boot/unicode.pf2; then
+    if loadfont (\$root)/EFI/boot/unicode.pf2; then
       set with_fonts=true
     fi
     if [ "\$textmode" != "true" -a "\$with_fonts" == "true" ]; then
@@ -225,11 +225,11 @@ let
     ${ # When there is a theme configured, use it, otherwise use the background image.
     if config.isoImage.grubTheme != null then ''
       # Sets theme.
-      set theme=/EFI/boot/grub-theme/theme.txt
+      set theme=(\$root)/EFI/boot/grub-theme/theme.txt
       # Load theme fonts
-      $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont /EFI/boot/grub-theme/%P\n")
+      $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n")
     '' else ''
-      if background_image /EFI/boot/efi-background.png; then
+      if background_image (\$root)/EFI/boot/efi-background.png; then
         # Black background means transparent background when there
         # is a background image set... This seems undocumented :(
         set color_normal=black/black
@@ -307,12 +307,12 @@ let
     ${grubMenuCfg}
 
     hiddenentry 'Text mode' --hotkey 't' {
-      loadfont /EFI/boot/unicode.pf2
+      loadfont (\$root)/EFI/boot/unicode.pf2
       set textmode=true
       terminal_output gfxterm console
     }
     hiddenentry 'GUI mode' --hotkey 'g' {
-      $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont /EFI/boot/grub-theme/%P\n")
+      $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n")
       set textmode=false
       terminal_output gfxterm
     }