Skip to content

Commit

Permalink
k3s: setup on lt-hp-omen
Browse files Browse the repository at this point in the history
  • Loading branch information
xddxdd committed Apr 23, 2024
1 parent a2b3ccc commit f5f8e81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
2 changes: 2 additions & 0 deletions home/client-apps/dev-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ in
# Kubernetes
arkade
faas-cli # OpenFaaS
ktop
kubectl
kubernetes-helm
lens

# LaTeX
texlive.combined.scheme-full
Expand Down
1 change: 1 addition & 0 deletions hosts/lt-hp-omen/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

../../nixos/optional-apps/clamav.nix
../../nixos/optional-apps/glauth.nix
../../nixos/optional-apps/k3s.nix
../../nixos/optional-apps/libvirt
../../nixos/optional-apps/netease-cloud-music.nix
../../nixos/optional-apps/netns-wg-lantian.nix
Expand Down
31 changes: 3 additions & 28 deletions nixos/optional-apps/k3s.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,8 @@
...
}@args:
{
systemd.enableUnifiedCgroupHierarchy = true;

systemd.services."container@k3s-server".environment = {
SYSTEMD_NSPAWN_UNIFIED_HIERARCHY = "1";
};

systemd.tmpfiles.rules = [ "d /var/lib/k3s-server 755 root root" ];

containers.k3s-server = LT.container {
name = "docker";
ipSuffix = "230";

outerConfig = {
bindMounts = {
var-lib = {
hostPath = "/var/lib/k3s-server";
mountPoint = "/var/lib";
isReadOnly = false;
};
};
};

innerConfig = _: {
services.k3s = {
enable = true;
role = "server";
};
};
services.k3s = {
enable = true;
role = "server";
};
}

0 comments on commit f5f8e81

Please sign in to comment.