Configuration options

By including the microvm module a set of NixOS options is made available for customization. These are the most important ones:

OptionPurpose
microvm.hypervisorHypervisor to use by default in microvm.declaredRunner
microvm.vcpuNumber of Virtual CPU cores
microvm.memRAM allocation in MB
microvm.interfacesNetwork interfaces
microvm.volumesBlock device images
microvm.sharesShared filesystem directories
microvm.devicesPCI/USB devices for host-to-vm passthrough
microvm.socketControl socket for the Hypervisor so that a MicroVM can be shutdown cleanly
microvm.user(qemu only) User account which Qemu will switch to when started as root
microvm.forwardPorts(qemu user-networking only) TCP/UDP port forwarding
microvm.kernelParamsLike boot.kernelParams but will not end up in system.build.toplevel, saving you rebuilds
microvm.storeOnDiskEnables the store on the boot squashfs even in the presence of a share with the host's /nix/store
microvm.writableStoreOverlayOptional string of the path where all writes to /nix/store should go to.

See the options declarations for a full reference.