init
This commit is contained in:
commit
dc5069e9b2
7 changed files with 323 additions and 0 deletions
40
microvm.nix
Normal file
40
microvm.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
_: {
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue