This commit is contained in:
ari committed 2025-02-21 21:09:26 -05:00
1 parent 73a084fccd
commit 629d0fa261
4 files changed
+30 -20

No files matched your search

+6 -1
View File
@@ -20,7 +20,12 @@ in
};
options = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "defaults" ];
default = [
"x-systemd.automount"
"auto"
"nofail"
"_netdev"
];
};
};
};
+10
View File
@@ -19,6 +19,8 @@ in
};
config =
let openPorts = [ 6443 80 443 ];
in
lib.mkIf cfg.enable {
system.activationScripts.k3sEnv = ''
set -e
@@ -31,6 +33,14 @@ in
enable = true;
environmentFile = "/var/lib/k3s/.env";
role = cfg.role;
extraFlags = [
"--disable servicelb"
"write-kubeconfig-mode 640"
"--write-kubeconfig-group users"
"--disable-helm-controller"
];
};
networking.firewall.allowedUDPPorts = openPorts;
networking.firewall.allowedTCPPorts = openPorts;
};
}