nfsroot: adopt new deployment options

This commit is contained in:
Astro 2022-06-16 22:41:04 +02:00
parent 6715d08bf3
commit e87daaee2f
1 changed files with 5 additions and 23 deletions

View File

@ -11,30 +11,12 @@ in {
microvm = { microvm = {
hypervisor = "cloud-hypervisor"; hypervisor = "cloud-hypervisor";
mem = 2048; mem = 2048;
};
shares = [ { c3d2.deployment = {
source = "/nix/store"; server = "server10";
mountPoint = "/nix/.ro-store"; mounts = [ "etc" "home" "var"];
tag = "store";
proto = "virtiofs";
socket = "store.socket";
} ] ++ map (dir: {
source = "/var/lib/microvms/${config.networking.hostName}/${dir}";
mountPoint = "/${dir}";
tag = builtins.baseNameOf dir;
proto = "virtiofs";
socket = "${builtins.baseNameOf dir}.socket";
}) [ "etc" "home" "var" ];
volumes = map (export: {
mountPoint = "/${export}";
image = "/dev/zvol/server10/vm/nfsroot/${builtins.baseNameOf export}";
autoCreate = false;
}) nfsExports;
interfaces = [ { interfaces = [ {
type = "tap"; net = "serv";
id = "nfsroot";
mac = "00:de:fa:c8:28:9c"; mac = "00:de:fa:c8:28:9c";
} ]; } ];
}; };