Grub error installation failed

Hi there,I am a rookie to Nixos and am using it alongside Ubuntu. I tried to resolve the “installation of GRUB failed” issue by using some earlier Nixos issues, but nothing was getting in the way

Installing for i386-pc platform.
/nix/store/4ifsgb6ljch39yrshhcr5m8z3q5jzb8g-grub-2.12-rc1/sbin/grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
/nix/store/4ifsgb6ljch39yrshhcr5m8z3q5jzb8g-grub-2.12-rc1/sbin/grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/nix/store/4ifsgb6ljch39yrshhcr5m8z3q5jzb8g-grub-2.12-rc1/sbin/grub-install: error: will not proceed with blocklists.
/nix/store/ installation of GRUB on /dev/sda failed: No such file or directory
warning: error(s) occurred while switching to the new configuration

my partitions is like:

sda      8:0    0 465,8G  0 disk 
├─sda1   8:1    0 232,8G  0 part 
├─sda2   8:2    0   477M  0 part 
└─sda3   8:3    0 232,5G  0 part /nix/store

sda1 is for ubuntu
sba2 is efi partition
sb3 is Nixos
this from my configuration.nix

 # Bootloader.
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;