Mounting drives to NixOS running VMWare Fusion on aarch64 MacOS

A while ago I thought I’d be smart and buy an M1 MacBook Air with a broken screen to build a really energy efficient, powerful, cheap homeserver.

Well, asahi doesn’t support Displays over USB-C, yet. And USB-C is all the device has. So that project died (cause I can’t see the installer).

But now, having the basic server setup and hearing the fan on my old laptop whizz all the time, I came back around to the Mac, trying to see how NixOS in a VM would perform for that purpose. It feels dirty and adds complexity, but might just be worth it. After all, it runs really well!

There’s just one minor issue: My design requires the actual data to be on an external drive (not even possible any other way with a 256 GB NVME). Unfortunately, when I connect a (NTFS, for testing (does it matter?)) SSD to the Mac, Fusion recognizes it well, offering to connect it to the VM. Only problem is that NixOS sees no trace of it. lsblk shows nothing and neither does KDE.

I suspect it’s because some integration is missing, along the lines of

virtualisation.vmware.guest.enable = true;

as discussed e.g. here. I’ve only managed to activate them in “headless” mode (not understanding what that even means). This does not affect the external disk issue, and I don’t know if a full activation would.

Has anybody managed to connect external drives to a NixOS VM? Using which tools? I’m not (yet) bound to Fusion.

It seems that mounting drives actually works fine. It just didn’t with the particular USB-C adapter/hub I used. When using a different one I can mount fine.

I did not test whether the virtualization.vmware.guest.enable = true; is required. I have it set and it works.