{ inputs, lib, config, pkgs, myhostname, ... }: let in { networking.firewall.allowedTCPPorts = [ 6443 # k3s: required so that pods can reach the API server (running on port 6443 by default) 5173 # 2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration # 2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration ]; services.k3s = { enable = true; role = "server"; extraFlags = toString ([ "--write-kubeconfig-mode \"0644\"" "--cluster-init" "--disable servicelb" "--disable traefik" "--disable local-storage" ]); clusterInit = true; }; systemd.tmpfiles.rules = [ "L+ /usr/local/bin - - - - /run/current-system/sw/bin/" ]; services.openiscsi = { enable = true; name = "iqn.2016-04.com.open-iscsi:${myhostname}"; }; environment.systemPackages = with pkgs; [ neovim k3s cifs-utils nfs-utils git ]; }