mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
feat(microvm): make the guest volume sizes configurable
etcSize/varSize/homeSize (MiB) with the old defaults. The masters get a 20G /var: k3s server + containerd + logs already filled the old 4G.
This commit is contained in:
1 parent
4ad359696e
commit
e428d66abf
4 files changed
+10
-3
No files matched your search
@@ -14,6 +14,7 @@ let
|
||||
inherit (myvars) networking;
|
||||
vcpu = 2;
|
||||
mem = 8192;
|
||||
varSize = 20480;
|
||||
};
|
||||
k3sModule = mylib.genK3sServerModule {
|
||||
inherit pkgs;
|
||||
|
||||
@@ -14,6 +14,7 @@ let
|
||||
inherit (myvars) networking;
|
||||
vcpu = 2;
|
||||
mem = 4096;
|
||||
varSize = 20480;
|
||||
};
|
||||
k3sModule = mylib.genK3sServerModule {
|
||||
inherit pkgs;
|
||||
|
||||
@@ -14,6 +14,7 @@ let
|
||||
inherit (myvars) networking;
|
||||
vcpu = 2;
|
||||
mem = 8192;
|
||||
varSize = 20480;
|
||||
};
|
||||
k3sModule = mylib.genK3sServerModule {
|
||||
inherit pkgs;
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
# vCPU count and RAM (MiB) -- mirrors the KubeVirt instancetype
|
||||
vcpu,
|
||||
mem,
|
||||
# persistent volume sizes in MiB
|
||||
etcSize ? 64,
|
||||
varSize ? 4096,
|
||||
homeSize ? 4096,
|
||||
# extra stateful mounts (e.g. aquamarine's /data on the passed-through HDDs)
|
||||
extraVolumes ? [ ],
|
||||
...
|
||||
@@ -60,17 +64,17 @@ in
|
||||
{
|
||||
mountPoint = "/etc"; # ssh host keys (the agenix age identity!), machine-id
|
||||
image = "etc.img";
|
||||
size = 64;
|
||||
size = etcSize;
|
||||
}
|
||||
{
|
||||
mountPoint = "/var"; # k3s data (/var/lib/rancher/k3s), nixos uid/gid maps
|
||||
image = "var.img";
|
||||
size = 4096;
|
||||
size = varSize;
|
||||
}
|
||||
{
|
||||
mountPoint = "/home"; # user data
|
||||
image = "home.img";
|
||||
size = 4096;
|
||||
size = homeSize;
|
||||
}
|
||||
]
|
||||
++ extraVolumes;
|
||||
|
||||
Reference in new issue
Block a user