Running NixOS Micro VMs on macOS

April 9, 2026
A group of diverse runners jogging along a scenic city pathway in Panama City, promoting healthy lifestyle.
Photo by Hugo Polo on Pexels

What happened

microvm.nix — a small framework for running NixOS micro VMs — now supports macOS via vfkit, which uses Apple's virtualization framework. It has been reported that vfkit delivers better performance than QEMU on Apple Silicon, making native AArch64 test rigs less of a slog. The catch? You need Nix and Nix Darwin on the host, plus a NixOS builder configured as an aarch64-linux target (Nix Darwin’s linux-builder makes that surprisingly painless). The original author says the docs are thin, so they wrote a hands-on note after wrestling with a MacBook M4 setup — a welcome roadmap for anyone who hit the same wall.

How it works

The setup uses a flake-driven Nix Darwin configuration to start a linux-builder, then a microvm.nix manifest that picks vfkit as the hypervisor, allocates 4 vCPUs and 8 GB RAM, and mounts a 40 GB writable image for /nix/.rw-store. The host’s Nix store is mounted read-only via virtiofs and combined with the writable overlay so the VM has a working /nix/store. You can also share host folders (the example mounts a Projects directory) and configure a user-mode network interface — note that vfkit currently supports only NAT networking, so bridged setups are off the table for now.

Why does this matter? For developers tied to Nix and Apple Silicon, it’s a neat shortcut to reproducible, native-arm Nix builds without wrestling with cross-compilation or slow emulation. It’s practical work: build the darwinConfiguration, switch the system, verify ssh to linux-builder with uname -a, then launch the micro VM. Sparse documentation aside, this makes running lightweight, performant NixOS instances on macOS a real option — and that’s a small but meaningful win in the age of Apple Silicon.

Sources: abhinavsarkar.net, Lobsters