Build the configuration and open it in a virtual machine

nixos-rebuild

sudo nixos-rebuild build-vm

click the source code to copy