Failing to nixos-install while using disko

Ive been trying to install nixos on my laptop using disko to partition and mount my drive, but keep getting the error: You must set the option boot.loader.grub.devices or boot.loader.grub.mirroredBoots to make the system bootable.

I am using this command to install nixos:
sudo nixos-install --root /mnt --flake .#lenovo-y520

Heres my github repo with both my disko and general nixos config:

I’ve been following both the official quick-start guide (disko/docs/quickstart.md at bafad29f89e83b2d861b493aa23034ea16595560 · nix-community/disko · GitHub) and one using flakes (Install NixOS with disko disk partitioning – NixOS Asia). I’ve based my disko configuration file on the btrfs-subvolumes on from the disko examples (disko/example/btrfs-subvolumes.nix at bafad29f89e83b2d861b493aa23034ea16595560 · nix-community/disko · GitHub)

I think the following might help, in configuration.nix add something like this:

boot.loader.grub = {
enabled = true;
device = "/dev/nvme0n1";
efiSupport = true;
};
boot.loader.efi.canTouchEfiVariables = true;

if your laptop doesn’t use efi, remove the two lines talking about efi.

Yes, I do believe that is what ill be trying next. I’ve just avoided trying this out so far because of the “Note: It’s not necessary to set boot.loader.grub.device here, since Disko will take care of that automatically.” from step 7 of the official disko quick-start guide.

Looks like it does, but only for EF02 (which also sets the priority correctly for a hybrid partition so you can skip that setting).

This actually makes sense, because the manual talks about that paragraph being for hybrid schemes. You’d need to mark the partition as a BIOS (i.e., EF02 not EF00) for that to work.

On that note, have you considered not using grub? Doesn’t look like you actually need a hybrid partition or windows support.