From 423a154cadd4c3a655c16dafc3ca37856533d0fd Mon Sep 17 00:00:00 2001 From: ari Date: Thu, 23 Oct 2025 11:42:53 -0400 Subject: [PATCH] added ports for tabby & ollama --- hosts/hl-fwdesk.hardware-configuration.nix | 26 +++++++++++------- hosts/hl-fwdesk.nix | 29 +++++++++++++-------- hosts/hl-minipc2.hardware-configuration.nix | 9 ++++--- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/hosts/hl-fwdesk.hardware-configuration.nix b/hosts/hl-fwdesk.hardware-configuration.nix index 7d90fad..f7bf184 100644 --- a/hosts/hl-fwdesk.hardware-configuration.nix +++ b/hosts/hl-fwdesk.hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ]; @@ -14,34 +15,39 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; + { + device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; fsType = "btrfs"; options = [ "subvol=root" ]; }; fileSystems."/home" = - { device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; + { + device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; fsType = "btrfs"; options = [ "subvol=home" ]; }; fileSystems."/nix" = - { device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; + { + device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; fsType = "btrfs"; options = [ "subvol=nix" ]; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1D9A-20EC"; + { + device = "/dev/disk/by-uuid/1D9A-20EC"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; - fileSystems."/data" = - { device = "/dev/disk/by-uuid/f241ec6e-939c-4f10-bc72-3094b99de4eb"; - fsType = "btrfs"; - options = [ "subvol=data" ]; - }; + fileSystems."/data" = + { + device = "/dev/disk/by-uuid/f241ec6e-939c-4f10-bc72-3094b99de4eb"; + fsType = "btrfs"; + options = [ "subvol=data" ]; + }; swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/hosts/hl-fwdesk.nix b/hosts/hl-fwdesk.nix index ec62aaa..ad39c0c 100644 --- a/hosts/hl-fwdesk.nix +++ b/hosts/hl-fwdesk.nix @@ -1,5 +1,12 @@ { ... }: { pkgs, ... }: +let + ports = { + tabby = 11029; + ollama = 11434; +}; + openPorts = [ports.ollama ports.tabby]; +in { imports = [ ./hl-fwdesk.hardware-configuration.nix ]; # Skyg @@ -51,14 +58,6 @@ services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.wayland = true; services.displayManager.defaultSession = "niri"; - # Network - # networking.nameservers = [ "10.0.0.1" "9.9.9.9" "1.1.1.1" ]; - # services.resolved = { - # enable = true; - # dnssec = "true"; - # fallbackDns = [ "10.0.0.1" "9.9.9.9" "1.1.1.1" ]; - # dnsovertls = "true"; - # }; # Firmware updater services.fwupd.enable = true; # Bluetooth @@ -90,18 +89,26 @@ localNetworkGameTransfers.openFirewall = true; }; # Ollama + services.open-webui.enable = true; services.ollama = { enable = true; host = "0.0.0.0"; - port = 11434; + port = ports.ollama; acceleration = "rocm"; - rocmOverrideGfx = "11.0.2"; }; - # # Brother Printer + # Tabby + services.tabby = { + enable = true; + acceleration = "rocm"; + host = "0.0.0.0"; + port = ports.tabby; + }; environment.localBinInPath = true; programs.nh = { enable = true; flake = "/home/ari/nixos-setup"; clean.enable = true; }; + networking.firewall.allowedUDPPorts = openPorts; + networking.firewall.allowedTCPPorts = openPorts; } diff --git a/hosts/hl-minipc2.hardware-configuration.nix b/hosts/hl-minipc2.hardware-configuration.nix index 354eb73..cb1a20f 100644 --- a/hosts/hl-minipc2.hardware-configuration.nix +++ b/hosts/hl-minipc2.hardware-configuration.nix @@ -2,7 +2,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; @@ -11,12 +12,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/2c1a9e86-5b82-4545-bea1-c1b6b688fdf8"; + { + device = "/dev/disk/by-uuid/2c1a9e86-5b82-4545-bea1-c1b6b688fdf8"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/6583-1C43"; + { + device = "/dev/disk/by-uuid/6583-1C43"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; };