feat: add longhorn config

This commit is contained in:
2024-08-22 18:03:40 -04:00
parent 3923255ddc
commit ef9db173d3
4 changed files with 32 additions and 13 deletions

View File

@@ -19,10 +19,21 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.tmp.cleanOnBoot = true;
services.openssh.enable = true;
services.qemuGuest.enable = true;
# For longhorn
services.openiscsi = {
enable = true;
name = "iqn.2016-04.com.open-iscsi:${meta.hostname}";
};
systemd.tmpfiles.rules = [
"L+ /usr/local/bin - - - - /run/current-system/sw/bin/"
];
environment.systemPackages = with pkgs; [
git
neovim
@@ -31,10 +42,12 @@
services.k3s = {
enable = true;
# role = if builtins.elem meta.hostname servers then "server" else "agent";
role = "server";
tokenFile = config.age.secrets.k3s.path;
clusterInit = meta.hostname == "premhome-falcon-1";
serverAddr = if meta.hostname == "premhome-falcon-1" then "" else "https://premhome-falcon-1:6443";
serverAddr = if meta.hostname == "premhome-falcon-1" then "" else "https://premhome-falcon-1:6444";
extraFlags = "--disable=servicelb --disable=traefik";
};
networking.firewall.trustedInterfaces = [ "tailscale0" ];