microvm.autostart
MicroVMs to start by default.
This includes declarative config.microvm.vms
as well as MicroVMs that are managed through the microvm
command.
Type: list of string
Default:
[ ]
Declared by:
microvm.host.enable
Whether to enable the microvm.nix host module.
Type: boolean
Default:
true
Declared by:
microvm.host.tapScript
Commands to run after creating a tap interface
Defaults to bring the interface up.
If you do not want the interface to be automatically created
at all, just set
systemd.services."microvm-tap-interfaces@%i.service".enable = false
Type: strings concatenated with “\n”
Default:
"''/nix/store/p6c92mx3kmnqcr482d16qqz67yqam72p-iproute2-6.10.0/bin/ip link set \"$id\" up"
Example:
''
# Attach tap interface to bridge br0, and bring it up
''${pkgs.iproute2}/bin/ip link set "$id" master br0 up
''
Declared by:
microvm.host.useNotifySockets
Enable if all your MicroVMs run with a Hypervisor that sends readiness notification over a VSOCK.
Danger! If one of your MicroVMs doesn’t do this, its systemd service will not start up successfully!
Type: boolean
Default:
false
Declared by:
microvm.stateDir
Directory that contains the MicroVMs
Type: path
Default:
"/var/lib/microvms"
Declared by:
microvm.virtiofsd.extraArgs
Extra command-line switch to pass to virtiofsd.
Type: list of string
Default:
[ ]
Declared by:
microvm.virtiofsd.inodeFileHandles
When to use file handles to reference inodes instead of O_PATH file descriptors (never, prefer, mandatory)
Allows you to overwrite default behavior in case you hit “too many open files” on eg. ZFS. https://gitlab.com/virtio-fs/virtiofsd/-/issues/121
Type: null or one of “never”, “prefer”, “mandatory”
Default:
null
Declared by:
microvm.virtiofsd.threadPoolSize
The amounts of threads virtiofsd should spawn. This option also takes the special
string \
nproc`` which spawns as many threads as the host has cores.
Type: string or (unsigned integer, meaning >=0)
Default:
"`nproc`"
Declared by:
microvm.vms
The MicroVMs that shall be built declaratively with the host NixOS.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
microvm.vms.<name>.autostart
Add this MicroVM to config.microvm.autostart?
Type: boolean
Default:
true
Declared by:
microvm.vms.<name>.config
A specification of the desired configuration of this MicroVM, as a NixOS module, for building without a flake.
Type: null or (Toplevel NixOS config)
Default:
null
Declared by:
microvm.vms.<name>.flake
Source flake for declarative build
Type: null or path
Default:
flakeInputs.my-infra
Declared by:
microvm.vms.<name>.nixpkgs
This option is only respected when config
is
specified.
The nixpkgs path to use for the MicroVM. Defaults to the host’s nixpkgs.
Type: path
Default:
pkgs.path
Declared by:
microvm.vms.<name>.pkgs
This option is only respected when config
is specified.
The package set to use for the MicroVM. Must be a nixpkgs package set with the microvm overlay. Determines the system of the MicroVM.
If set to null, a new package set will be instantiated.
Type: null or unspecified value
Default:
pkgs
Declared by:
microvm.vms.<name>.restartIfChanged
Restart this MicroVM’s services if the systemd units are changed, i.e. if it has been updated by rebuilding the host.
Defaults to true for fully-declarative MicroVMs.
Type: boolean
Default:
false
Declared by:
microvm.vms.<name>.specialArgs
This option is only respected when config
is specified.
A set of special arguments to be passed to NixOS modules.
This will be merged into the specialArgs
used to evaluate
the NixOS configurations.
Type: attribute set of unspecified value
Default:
{ }
Declared by:
microvm.vms.<name>.updateFlake
Source flakeref to store for later imperative update
Type: null or string
Default:
"git+file:///home/user/my-infra"
Declared by: