
set timeout=10

clear
# This message will only be viewable on the default (UEFI) console.
echo ""
echo "Loading graphical boot menu..."
echo ""
echo "Press 't' to use the text boot menu on this console..."
echo ""

set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}



# If the parameter iso_path is set, append the findiso parameter to the kernel
# line. We need this to allow the nixos iso to be booted from grub directly.
if [ ${iso_path} ] ; then
  set isoboot="findiso=${iso_path}"
fi

#
# Menu entries
#

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf 
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf 
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




submenu "Options" --class submenu --class hidpi {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}



  submenu "Copy ISO Files to RAM" --class copytoram {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf copytoram
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf copytoram
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "No modesetting" --class nomodeset {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf nomodeset
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf nomodeset
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Debug Console Output" --class debug {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf debug
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf debug
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Disable display-manager" --class quirk-disable-displaymanager {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf systemd.mask=display-manager.service plymouth.enable=0
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf systemd.mask=display-manager.service plymouth.enable=0
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Rotate framebuffer Clockwise" --class rotate-90cw {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:1
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:1
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Rotate framebuffer Upside-Down" --class rotate-180 {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:2
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:2
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Rotate framebuffer Counter-Clockwise" --class rotate-90ccw {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:3
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf fbcon=rotate:3
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

submenu "Serial console=ttyS0,115200n8" --class serial {
  set textmode=false

#
# Menu configuration
#

# Search using a "marker file"
search --set=root --file /EFI/nixos-installer-image

insmod gfxterm
insmod png
set gfxpayload=keep
set gfxmode=1920x1200,1920x1080,1366x768,1280x800,1280x720,1200x1920,1024x768,800x1280,800x600,auto

if [ "$textmode" == "false" ]; then
  terminal_output gfxterm
  terminal_input  console
else
  terminal_output console
  terminal_input  console
  # Sets colors for console term.
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

# Sets theme.
set theme=($root)/EFI/BOOT/grub-theme/theme.txt
# Load theme fonts
loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2


hiddenentry 'Text mode' --hotkey 't' {
  loadfont ($root)/EFI/BOOT/unicode.pf2
  set textmode=true
  terminal_output console
}

hiddenentry 'GUI mode' --hotkey 'g' {
  loadfont ($root)/EFI/BOOT/grub-theme/dejavu.pf2
  set textmode=false
  terminal_output gfxterm
}


  menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux LTS)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/fimdq7bns0yl1q00f3yl2vmv88ara1fh-linux-6.18.66/bzImage ${isoboot} init=/nix/store/zny710qc5nar13lzlyxiyd7cr6awc2m5-nixos-system-nixos-26.05.15577.02c2b5b48355/init nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf console=ttyS0,115200n8
  initrd /boot//nix/store/1228536z0kjr36xgzjz0xl0apz9fwh2j-initrd-linux-6.18.66/initrd
}

menuentry 'NixOS 26.05.15577.02c2b5b48355 Installer (Linux 7.3.7)' --class installer {
  # Fallback to UEFI console for boot, efifb sometimes has difficulties.
  terminal_output console

  linux /boot//nix/store/xp3dyylfjb028v0waayll9zbi1vvf65q-linux-7.3.7/bzImage ${isoboot} init=/nix/store/hzgc6w0vcp0qavzm491v2nfzqrh54gwm-nixos-system-nixos-26.05.15577.02c2b5b48355/init root=fstab loglevel=4 lsm=landlock,yama,bpf console=ttyS0,115200n8
  initrd /boot//nix/store/fs35jiqcdb8wyhbhimqwlfzbmkx26gg2-initrd-linux-7.3.7/initrd
}




}

}

# GRUB apparently cannot do "chainloader" operations on "CD".
if [ "$root" != "cd0" ]; then
  menuentry 'rEFInd' --class refind {
    # Force root to be the FAT partition
    # Otherwise it breaks rEFInd's boot
    search --set=root --no-floppy --fs-uuid 1234-5678
    chainloader ($root)/EFI/BOOT/refind_x64.efi
  }
fi

menuentry 'Memtest86+' --class debug {
  linux ($root)/boot/memtest.bin 
}

menuentry 'Firmware Setup' --class settings {
  fwsetup
  clear
  echo ""
  echo "If you see this message, your EFI system doesn't support this feature."
  echo ""
}
menuentry 'Shutdown' --class shutdown {
  halt
}
