[NixOS] Try to connect jimi-hendnix to ryzen-shine in k3s
This commit is contained in:
parent
1003c33dee
commit
f00d9bdb12
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -5,6 +5,10 @@
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
myModules.railbird-k3s = {
|
||||
enable = true;
|
||||
serverAddr = "https://ryzen-shine.local:6433";
|
||||
};
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = true;
|
||||
@ -18,7 +22,6 @@
|
||||
myModules.postgres.enable = true;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
myModules.nvidia.enable = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
features.full.enable = true;
|
||||
myModules.kubelet.enable = false;
|
||||
myModules.railbird-k3s.enable = true;
|
||||
myModules.nvidia.enable = true;
|
||||
# Needed for now because monitors have different refresh rates
|
||||
myModules.xmonad.picom.vSync.enable = false;
|
||||
|
BIN
nixos/secrets/1896Folsom-k3s-token.age
Normal file
BIN
nixos/secrets/1896Folsom-k3s-token.age
Normal file
Binary file not shown.
@ -13,5 +13,6 @@ in
|
||||
"gitea-runner-token.mac-demarco-mini.age".publicKeys = keys.agenixKeys ++ keys.railbird-sf;
|
||||
"nextcloud-admin.age".publicKeys = keys.agenixKeys;
|
||||
"ryzen-shine-kubernetes-token.age".publicKeys = keys.agenixKeys;
|
||||
"1896Folsom-k3s-token.age".publicKeys = keys.agenixKeys;
|
||||
"api_service_account_key.json.age".publicKeys = keys.agenixKeys;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user