diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-09-03 16:13:29 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-09-03 19:07:03 +0530 |
commit | 13c8547b08f23b8676e1c7491ce7ee01cdf2a90d (patch) | |
tree | 84663d93788c6764d8967673a0a3998352fdd05b /os | |
parent | 572096a58cda232f26be8cc0ad30cbf72bffcc5b (diff) |
feat(os/pc/work): init k8s cluster
Diffstat (limited to 'os')
-rw-r--r-- | os/cez/configuration.nix | 1 | ||||
-rw-r--r-- | os/pc/modules/work.nix | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/os/cez/configuration.nix b/os/cez/configuration.nix index a05f00e..debae56 100644 --- a/os/cez/configuration.nix +++ b/os/cez/configuration.nix @@ -1,4 +1,3 @@ -{ ... }: { imports = [ ../pc/configuration.nix diff --git a/os/pc/modules/work.nix b/os/pc/modules/work.nix index 9bd1d75..58aa4e0 100644 --- a/os/pc/modules/work.nix +++ b/os/pc/modules/work.nix @@ -15,4 +15,23 @@ in virtualisation.docker.enable = true; users.extraGroups.docker.members = [ user ]; + + systemd.services.k3s.path = [ pkgs.criu ]; + environment = { + variables.KUBECONFIG = "/etc/rancher/k3s/k3s.yaml"; + systemPackages = with pkgs; [ + kubernetes-helm + k9s + ]; + }; + services.k3s = { + gracefulNodeShutdown.enable = true; + enable = true; + clusterInit = true; + role = "server"; + extraFlags = [ + "--write-kubeconfig-group users" + "--write-kubeconfig-mode 0640" + ]; + }; } |