Building a VM on MacOS

The following works on my macOS aarch64 laptop

nix run nixpkgs#darwin.linux-builder

I am trying to do it from first principles but struggling:

{system ? builtins.currentSystem, pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-24.05.tar.gz") { inherit system; }}:
let
    nixos = pkgs.nixos ({config, lib, ...}: {
    });
in
nixos.vm

Running this fails asserts on needing to be Linux.

Appreciate any understanding of the missing piece here.