nfsroot: adopt new deployment options
This commit is contained in:
parent
6715d08bf3
commit
e87daaee2f
|
@ -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";
|
||||
} ];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue