Join robin to cluster
This commit is contained in:
parent
af15c4723e
commit
059a2a5277
1 changed files with 24 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{ self, inputs, ... }: {
|
||||
flake.nixosModules.robinConfiguration = { pkgs, ... }: {
|
||||
flake.nixosModules.robinConfiguration = { pkgs, config, ... }: {
|
||||
imports = [
|
||||
self.nixosModules.robinHardware
|
||||
self.nixosModules.nest
|
||||
|
|
@ -17,6 +17,8 @@
|
|||
traceroute
|
||||
neovim
|
||||
wget
|
||||
openiscsi # Required for longhorn
|
||||
nfs-utils
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
@ -24,8 +26,29 @@
|
|||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
|
||||
openiscsi.enable = true;
|
||||
openiscsi.name = "iqn.2005-10.nixos:${config.networking.hostName}";
|
||||
|
||||
envfs.enable = true;
|
||||
};
|
||||
|
||||
# Enable K3s in Agent Mode
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "agent";
|
||||
|
||||
serverAddr = "https://192.168.1.122:6443";
|
||||
tokenFile = "/var/lib/rancher/k3s/join-token";
|
||||
};
|
||||
|
||||
# Fix non-FHS paths for longhorn
|
||||
# This creates persistent symlinks where Longhorn expects to find them.
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /usr/bin/iscsiadm - - - - /run/current-system/sw/bin/iscsiadm"
|
||||
"L+ /sbin/iscsiadm - - - - /run/current-system/sw/bin/iscsiadm"
|
||||
];
|
||||
|
||||
# RAID
|
||||
boot.swraid = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue