Add microvm data dirs

(untested because virtiofs mounts currently dont work)
This commit is contained in:
ahtlon
2025-02-06 15:40:25 +01:00
committed by kalipso
parent 3ae3bbda6b
commit 49aed32687
4 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ result
.direnv/
book/
fanny-efi-vars.fd
nix-store-overlay.img

View File

@@ -57,6 +57,11 @@ in
};
};
systemd.tmpfiles.rules = [
"L /var/lib/microvms/data - - - - /data/microvms"
"d /data/microvms 0755 root root" #not needed for real host?
];
malobeo.initssh = {
enable = true;
authorizedKeys = sshKeys.admins;

View File

@@ -252,6 +252,10 @@ in
type = "zfs_fs";
mountpoint = "/data";
};
"encrypted/data/microvm" = {
type = "zfs_fs";
mountpoint = "/data/microvm";
};
reserved = {
# for cow delete if pool is full
options = {

View File

@@ -70,6 +70,13 @@ rec {
proto = "virtiofs";
socket = "var.socket";
}
{
source = "/var/lib/microvms/data/${hostName}";
mountPoint = "/data";
tag = "data";
proto = "virtiofs";
socket = "microdata.socket";
}
];
interfaces = [