add some vm configs

This commit is contained in:
2026-09-15 22:36:17 -05:00
parent f65ceb083f
commit 74ffdf731c
2 changed files with 44 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
{
config,
pkgs,
meta,
...
}:
{
# ================================ #
# K3S SERVICE #
# ================================ #
services.k3s = {
enable = true;
disable = [ "traefik" ];
role = "server";
# only enable the service on k3s when roughly finalized
# Until then use a vm, as k3s is persisted
extraFlags = [
"--data-dir=/var/lib/rancher/k3s"
"--cluster-cidr=10.42.0.0/20"
];
};
# ================================ #
# PSQL SERVICE #
# ================================ #
# Postgresql/postgrest for row storage (not on k3s)
services.postgresql-db = {
enable = true;
dataDir = "/var/lib/postgresql";
port = 5432;
credentialsFile = ./secrets/ex-psql.yaml;
databases = [
"test"
];
ipMasks = [
"10.42.0.0/20" # k3s pod mask
];
};
}