Thanks a lot!
My GRUB menu wasn’t showing with UEFI and your solution fixed it:
# configuration.nix
{
boot.loader = {
timeout = 5;
efi = {
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
version = 2;
efiSupport = true;
efiInstallAsRemovable = true; # Otherwise /boot/EFI/BOOT/BOOTX64.EFI isn't generated
devices = [ "nodev" ];
extraEntriesBeforeNixOS = true;
extraEntries = ''
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
'';
};
};
}
Then
$ rm -rv /boot/*
$ nixos-rebuild switch