From 059a2a527766c8ecf7056369f0af30e6871aa438 Mon Sep 17 00:00:00 2001 From: Astra Logical Date: Thu, 11 Jun 2026 15:38:01 -0400 Subject: [PATCH] Join robin to cluster --- modules/hosts/robin/configuration.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/hosts/robin/configuration.nix b/modules/hosts/robin/configuration.nix index 08c3155..1f88c5d 100644 --- a/modules/hosts/robin/configuration.nix +++ b/modules/hosts/robin/configuration.nix @@ -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;