Dual boot Nixos with Arch Linux, Arch isn't in grub menu

I’ve been trying to install a dual boot system with nixos and Arch. I’ve successfully installed both (Arch and then Nixos) but my current grub menu only shows Nixos. Here’s what I did.

Set up partition table:
1 MiB unallocated space (gparted wouldn’t let me use this first 1 MiB.
sda1 2MiB, no file system, no mount point, BIOS_grub flag
sda2 512MiB, ext4, mount point = /boot
sda3 75GiB, ext4, for nixos
sda4 75GiB, ext4, for arch
sda5 2.7TiB, ext4, mount point = /storage
sda6 8GiB, swap

I SUCCESSFULLY installed Arch on sda4 and it created a grub menu that appeared on boot with the Arch installation.

I SUCCESFULLY installed Nixos on sda3. During the installation, I did NOT mount sda2 or sda4. When I rebooted, I got a grub menu, but it did NOT have the Arch installation.

I SUCCESSFULLY RE-installed Nixos, again on sda3, but this time I made directories /mnt/boot, /mnt/arch and /mnt/storage. I mounted sda2 at /mnt/boot, sda4 at /arch and sda5 at /storage and completed the installation with no errors. Again, there was no Arch installation in the grub menu. As expected, /arch and /storage were both present in the file system when I looked using the file manager.

How can I get Arch to appear in the grub menu?

As you are using grub you can set boot.loader.grub.useOSProber to true. https://nixos.org/nixos/options.html#boot.loader.grub.useosprober

I forgot to include in my original post that I did include that line in my configuration file and I also added os-prober to the packages to be installed. Though I did this during the installation, Arch didn’t appear in the grub menu.

my configuration looks like this

it detects OSes from other partitions. basically you need to enable grub. It is not much clear from the nixos manual.

This post at the very end says

After rebooting, you’ll notice that Ubuntu still doesn’t show up in the GRUB boot menu. We still have one step left.
Boot into NixOS again and run nixos-rebuild --install-bootloader switch . This will update GRUB and it should automatically detect Ubuntu. It should now be possible to select Ubuntu or NixOS from the boot menu.

It may be helpful…