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 = {
hypervisor = "cloud-hypervisor";
mem = 2048;
shares = [ {
source = "/nix/store";
mountPoint = "/nix/.ro-store";
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;
};
c3d2.deployment = {
server = "server10";
mounts = [ "etc" "home" "var"];
interfaces = [ {
type = "tap";
id = "nfsroot";
net = "serv";
mac = "00:de:fa:c8:28:9c";
} ];
};