nix/nixos/htz/vms/k3s.nix
2024-03-10 03:13:58 -05:00

28 lines
524 B
Nix

{pkgs, ...}: {
environment.systemPackages = with pkgs; [
k3s
];
services.k3s = {
enable = true;
role = "server";
extraFlags = toString [
"--disable traefik"
];
};
networking.firewall = {
allowedTCPPorts = [6443];
};
services.tailscale.enable = true;
microvm = {
vcpu = 2;
mem = 4096;
volumes = [
{
image = "/var/lib/microvms/vm-k3s/vm-k3s-root.img";
label = "vm-pool-root";
mountPoint = "/";
size = 10000;
}
];
};
}