mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-28 04:11:49 +01:00
feat: hosts/k8s - fix k3s cidr (#200)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
masterHost,
|
||||
tokenFile,
|
||||
nodeLabels ? [],
|
||||
k3sExtraArgs ? [],
|
||||
...
|
||||
}: let
|
||||
package = pkgs.k3s;
|
||||
@@ -10,7 +11,12 @@ in {
|
||||
environment.systemPackages = [package];
|
||||
|
||||
# Kernel modules required by cilium
|
||||
boot.kernelModules = ["ip6_tables" "ip6table_mangle" "ip6table_raw" "ip6table_filter"];
|
||||
boot.kernelModules = [
|
||||
"ip6_tables"
|
||||
"ip6table_mangle"
|
||||
"ip6table_raw"
|
||||
"ip6table_filter"
|
||||
];
|
||||
networking.enableIPv6 = true;
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
@@ -29,7 +35,8 @@ in {
|
||||
[
|
||||
"--data-dir /var/lib/rancher/k3s"
|
||||
]
|
||||
++ (map (label: "--node-label=${label}") nodeLabels);
|
||||
++ (map (label: "--node-label=${label}") nodeLabels)
|
||||
++ k3sExtraArgs;
|
||||
in
|
||||
pkgs.lib.concatStringsSep " " flagList;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user