Nixos-rebuild switch isn't updating the Grub menu with new generations

my current boot.loader.grub settings are:

  boot.loader.grub.enable = true;
  boot.loader.grub.device = "nodev";
  boot.loader.grub.useOSProber = true;

I also tried adding the boot.loader.grub.efiSupport = true; as suggested here, but that gave me the following message in the output. But this didn’t fix the issue as upon restart, new generation weren’t added to the GRUB menu:

updating GRUB 2 menu...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/block*[0-9]: not a block device
lsblk: /dev/mapper/devices*[0-9]: not a block device
lsblk: /dev/mapper/found*[0-9]: not a block device
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi

I will try this out now~