[NixOS] Try to connect jimi-hendnix to ryzen-shine in k3s
This commit is contained in:
parent
1003c33dee
commit
f00d9bdb12
@ -1,9 +1,29 @@
|
|||||||
{ config, makeEnable, ... }:
|
{ config, lib, ... }:
|
||||||
makeEnable config "myModules.railbird-k3s" false {
|
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 = {
|
services.k3s = {
|
||||||
enable = true;
|
enable = true;
|
||||||
role = "server";
|
role = "server";
|
||||||
clusterInit = true;
|
clusterInit = cfg.serverAddr == "";
|
||||||
|
serverAddr = cfg.serverAddr;
|
||||||
|
tokenFile = config.age.secrets."1896Folsom-k3s-token.age".path;
|
||||||
containerdConfigTemplate = ''
|
containerdConfigTemplate = ''
|
||||||
{{ template "base" . }}
|
{{ template "base" . }}
|
||||||
|
|
||||||
@ -20,4 +40,5 @@ makeEnable config "myModules.railbird-k3s" false {
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
../configuration.nix
|
../configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
myModules.railbird-k3s = {
|
||||||
|
enable = true;
|
||||||
|
serverAddr = "https://ryzen-shine.local:6433";
|
||||||
|
};
|
||||||
myModules.base.enable = true;
|
myModules.base.enable = true;
|
||||||
myModules.desktop.enable = true;
|
myModules.desktop.enable = true;
|
||||||
myModules.xmonad.enable = true;
|
myModules.xmonad.enable = true;
|
||||||
@ -18,7 +22,6 @@
|
|||||||
myModules.postgres.enable = true;
|
myModules.postgres.enable = true;
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
myModules.nvidia.enable = true;
|
myModules.nvidia.enable = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
features.full.enable = true;
|
features.full.enable = true;
|
||||||
myModules.kubelet.enable = false;
|
myModules.kubelet.enable = false;
|
||||||
|
myModules.railbird-k3s.enable = true;
|
||||||
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;
|
||||||
|
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;
|
"gitea-runner-token.mac-demarco-mini.age".publicKeys = keys.agenixKeys ++ keys.railbird-sf;
|
||||||
"nextcloud-admin.age".publicKeys = keys.agenixKeys;
|
"nextcloud-admin.age".publicKeys = keys.agenixKeys;
|
||||||
"ryzen-shine-kubernetes-token.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;
|
"api_service_account_key.json.age".publicKeys = keys.agenixKeys;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user