40 lines
879 B
Nix
40 lines
879 B
Nix
_: {
|
|
|
|
microvm = {
|
|
interfaces = [
|
|
{
|
|
type = "user";
|
|
|
|
# interface name on the host
|
|
id = "vm-a1";
|
|
|
|
# Ethernet address of the MicroVM's interface, not the host's
|
|
#
|
|
# Locally administered have one of 2/6/A/E in the second nibble.
|
|
mac = "02:00:00:00:00:01";
|
|
}
|
|
];
|
|
volumes = [
|
|
{
|
|
mountPoint = "/var";
|
|
image = "var.img";
|
|
size = 256;
|
|
}
|
|
];
|
|
shares = [
|
|
{
|
|
# use proto = "virtiofs" for MicroVMs that are started by systemd
|
|
proto = "9p";
|
|
tag = "ro-store";
|
|
# a host's /nix/store will be picked up so that no
|
|
# squashfs/erofs will be built for it.
|
|
source = "/nix/store";
|
|
mountPoint = "/nix/.ro-store";
|
|
}
|
|
];
|
|
|
|
# "qemu" has 9p built-in!
|
|
hypervisor = "qemu";
|
|
socket = "control.socket";
|
|
};
|
|
}
|