Most of the time I use Debian Bookworm with pipx. However, I found a thread, where I explained the configuration using nixpkg to reproduce a bug.
Virtual machines can be risky since you may lose connectivity to the USB device and it’s preferable to use physical hardware without any USB hubs for flashing.