3 Commits

Author SHA1 Message Date
9f62e03d95 [fanny] more ram and cores for vmVariantWithDisko
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m13s
2025-02-06 17:37:00 +01:00
46ed793529 [disko] no encrypted swap when encryption disabled 2025-02-06 17:36:25 +01:00
ahtlon
67399b462d Add microvm data dirs
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m17s
(untested because virtiofs mounts currently dont work)
2025-02-06 15:40:25 +01:00
4 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View File

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

View File

@@ -20,6 +20,13 @@ in
inputs.self.nixosModules.malobeo.metrics inputs.self.nixosModules.malobeo.metrics
]; ];
virtualisation.vmVariantWithDisko = {
virtualisation = {
memorySize = 4096;
cores = 3;
};
};
malobeo.metrics = { malobeo.metrics = {
enable = true; enable = true;
enablePromtail = true; enablePromtail = true;
@@ -56,6 +63,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 = { malobeo.initssh = {
enable = true; enable = true;
authorizedKeys = sshKeys.admins; authorizedKeys = sshKeys.admins;

View File

@@ -102,7 +102,7 @@ in
mountOptions = [ "umask=0077" ]; mountOptions = [ "umask=0077" ];
}; };
}; };
encryptedSwap = { encryptedSwap = lib.mkIf cfg.encryption {
size = cfg.root.swap; size = cfg.root.swap;
content = { content = {
type = "swap"; type = "swap";
@@ -252,6 +252,10 @@ in
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/data"; mountpoint = "/data";
}; };
"encrypted/data/microvm" = {
type = "zfs_fs";
mountpoint = "/data/microvm";
};
reserved = { reserved = {
# for cow delete if pool is full # for cow delete if pool is full
options = { options = {

View File

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