[NixOS] Try to connect jimi-hendnix to ryzen-shine in k3s
This commit is contained in:
@@ -1,23 +1,44 @@
|
||||
{ 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 = {
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.myModules.railbird-k3s;
|
||||
in {
|
||||
options = {
|
||||
enable = mkEnableOption "railbird k3s";
|
||||
serverAddr = {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
age.secrets."1896Folsom-k3s-token.age".file = ./secrets/1896Folsom-k3s-token.age;
|
||||
services.dockerRegistry = {
|
||||
enable = true;
|
||||
listenAddress = "0.0.0.0";
|
||||
port = 5279;
|
||||
enableDelete = true;
|
||||
enableGarbageCollect = true;
|
||||
};
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
clusterInit = cfg.serverAddr == "";
|
||||
serverAddr = cfg.serverAddr;
|
||||
tokenFile = config.age.secrets."1896Folsom-k3s-token.age".path;
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user