add k3s

This commit is contained in:
2025-03-08 17:50:32 -05:00
parent 72198292ab
commit defc49c48a
7 changed files with 41 additions and 12 deletions

View File

@ -0,0 +1,8 @@
{
imports = [ ./common.nix ];
services.k3s = {
role = "agent";
serverAddr = "https://<ip of first node>:6443";
};
}

View File

@ -0,0 +1,11 @@
{ config, ... }:
{
services.k3s = {
enable = true;
tokenFile = config.sops.secrets.k3s-token.path;
};
sops.secrets.k3s-token = {
owner = "root";
mode = "0400";
};
}

View File

@ -0,0 +1,7 @@
{
imports = [ ./common.nix ];
services.k3s = {
role = "server";
clusterInit = true;
};
}