[NixOS] k3s draft

This commit is contained in:
Ivan Malison 2024-09-30 00:05:50 -06:00
parent 01361b7217
commit a493a530be
3 changed files with 25 additions and 1 deletions

View File

@ -19,6 +19,7 @@
./gnome.nix ./gnome.nix
./imalison.nix ./imalison.nix
./internet-computer.nix ./internet-computer.nix
./k3s.nix
./kat.nix ./kat.nix
./keybase.nix ./keybase.nix
./kubelet.nix ./kubelet.nix

23
nixos/k3s.nix Normal file
View File

@ -0,0 +1,23 @@
{ config, makeEnable, ... }:
makeEnable config "myModules.railbird-k3s" false {
services.k3s = {
enable = true;
role = "server";
clusterInit = true;
containerdConfigTemplate = ''
{{ template "base" . }}
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia]
privileged_without_host_devices = false
runtime_engine = ""
runtime_root = ""
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options]
BinaryName = "/run/current-system/sw/bin/nvidia-container-runtime"
'';
gracefulNodeShutdown = {
enable = true;
};
};
}

View File

@ -6,7 +6,7 @@
]; ];
features.full.enable = true; features.full.enable = true;
myModules.kubelet.enable = true; myModules.kubelet.enable = false;
myModules.nvidia.enable = true; myModules.nvidia.enable = true;
# Needed for now because monitors have different refresh rates # Needed for now because monitors have different refresh rates
myModules.xmonad.picom.vSync.enable = false; myModules.xmonad.picom.vSync.enable = false;