2024-04-07 13:35:38 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs',
|
|
|
|
...
|
|
|
|
}: {
|
2024-03-02 21:59:18 +01:00
|
|
|
imports = [
|
|
|
|
inputs'.uk3s-nix.nixosModules.uk3s
|
|
|
|
inputs'.uk3s-nix.nixosModules.ucontainers
|
|
|
|
inputs'.uk3s-nix.nixosModules.ucontainersNetwork
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
inputs'.uk3s-nix.overlays.templateHelmChart
|
|
|
|
];
|
|
|
|
|
2024-04-07 13:24:38 +02:00
|
|
|
ucontainers.uk3s.settings = {
|
|
|
|
bind = [
|
|
|
|
"/mnt/kyle/infrastructure/k3s/postgresql:/var/lib/postgresql"
|
|
|
|
"/mnt/kyle/infrastructure/k3s/rancher:/var/lib/rancher"
|
2024-04-07 13:35:38 +02:00
|
|
|
"/etc/rancher:/etc/rancher"
|
2024-04-07 13:24:38 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-04-07 13:35:38 +02:00
|
|
|
environment.systemPackages = [
|
|
|
|
config.services.uk3s.package
|
|
|
|
];
|
|
|
|
|
2024-03-02 21:59:18 +01:00
|
|
|
services.uk3s = {
|
|
|
|
enable = true;
|
2024-04-07 10:37:17 +02:00
|
|
|
hostAddress = "172.26.96.1/24";
|
|
|
|
guestAddress = "172.26.96.2/24";
|
2024-03-02 21:59:18 +01:00
|
|
|
|
2024-04-07 10:37:17 +02:00
|
|
|
vethNetwork = "172.26.96.0/24";
|
|
|
|
clusterNetwork = "172.26.80.0/20";
|
|
|
|
serviceNetwork = "172.26.88.0/21";
|
2024-03-02 21:59:18 +01:00
|
|
|
|
|
|
|
hostInterface = "uk3s0";
|
|
|
|
|
2024-07-16 20:41:59 +02:00
|
|
|
nix-snapshotter = {
|
2024-03-02 21:59:18 +01:00
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
k3s = {
|
|
|
|
settings = {
|
|
|
|
disable = [
|
|
|
|
"traefik"
|
|
|
|
"servicelb"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
datastore = {
|
|
|
|
type = "postgresql";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|