Error Creating Grub2 During Install

I’m getting error mentioned above (see attached pic) and the end of my nixos-install. I’m using these commands to formant ssd drive. Any help would be greatly appreciated!

wipefs -a /dev/sda

sudo parted /dev/sda – mklabel gpt

sudo parted /dev/sda – mkpart ESP fat32 1 512
sudo parted /dev/sda set 1 esp on
sudo parted /dev/sda – mkpart root ext4 512 102400
sudo mkfs.fat -F 32 -n boot /dev/sda1
sudo mkfs.ext4 -L nixos /dev/sda2

Make sure your config has boot.loader.grub.device = "nodev"; if you’re using UEFI (or just use systemd-boot instead of grub in that case)

Thanks for the reply. I must be braindead er sumpin. I forgot that the old desktop I was trying the install on was a legacy PC (bios only) duh! I had to change the parm to efi = false ‘cause there’ s no efi and of course nixos-install ran no problem. But then came the second problem which I can’t seem to figure out. The pc boots an I get a grub screen, select nixos and I quickly get a black screen with a flashing mouse pointer and that’s it. This is an old asus workstation “m3n ws” mobo and have an old nvidia 9800gt card installed on it. It also has a built-in hdmi port but both give same black screen. I’m looking for some way to get an error report to find the problem. So far no love.