Nixos has a configuration option in the manual for specifying extra entries in the grub menu "boot.loader.grub. extraEntries" but I can't figure out how to make it work for a second linux installation on the same hard disk with its own grub.
More specifics: I had ubuntu installed and booting from /dev/sda2 with /dev/sda1 formatted for FAT. I reformatted /dev/sda1 as ext4 and successfully installed nixos specifying /dev/sda for it's grub. And it boots fine, but doesn't show the ubuntu install. I would like to be able to specify the ubuntu as a menu item from the nixos grub which I believe I should be able to do by using the configuration option boot.loader.grub.extraEntries but I can't figure out exactly what I need to put in that entry to make it work. Could anyone provide me some pointers please?