kittehcluster/nixinfra/kitteh-node-1/server.nix
2024-07-14 11:03:54 -04:00

37 lines
No EOL
681 B
Nix

# Because this behaves as cluster init, all the "commons.server.nix" seperation
# isn't in here. However, normal commons is. Just fyi.
let
pkgs = import <nixpkgs> {};
in {
imports = [
../commons.nix
];
proxmox.qemuConf.memory = 4096;
proxmox.qemuConf.cores = 1;
proxmox.qemuConf.name = "k3s-server";
proxmox.qemuConf.diskSize = pkgs.lib.mkForce "16384";
networking.hostName = "kitteh-node-1-k3s-server";
services.k3s = {
role = "server";
clusterInit = true;
};
# K3s settings
networking.firewall = {
enable = true;
allowedTCPPorts = [
6443
2379
2380
];
allowedUDPPorts = [
8472
];
};
}