From a0b548da0ae9ed74b2e68c5edc0f29ec31eecf8f Mon Sep 17 00:00:00 2001 From: Nathan Date: Thu, 30 Jan 2025 09:19:39 -0600 Subject: [PATCH] expose homebox ollama only --- .../configuration/homebox/default.nix | 5 +- .../configuration/laptop/default.nix | 2 +- .../services/containers/traefik/default.nix | 67 ++----------------- 3 files changed, 9 insertions(+), 65 deletions(-) diff --git a/system-config/configuration/homebox/default.nix b/system-config/configuration/homebox/default.nix index cf39ffb..6b72baf 100644 --- a/system-config/configuration/homebox/default.nix +++ b/system-config/configuration/homebox/default.nix @@ -97,16 +97,13 @@ hostName = "homebox"; nameservers = [ "1.1.1.1" "1.0.0.1" ]; networkmanager.enable = true; - firewall.allowedTCPPorts = [ 22 80 443 8002 8003 8004 8005 ]; + firewall.allowedTCPPorts = [ 22 80 443 ]; firewall.interfaces."ve-traefik".allowedTCPPorts = [ 9000 8080 6080 8123 - 11432 - 11433 11434 - 11435 ]; hosts = { "192.168.100.11" = [ "blunkall.us" "*.blunkall.us" "*.local.blunkall.us" ]; diff --git a/system-config/configuration/laptop/default.nix b/system-config/configuration/laptop/default.nix index c78f4de..7b8d192 100644 --- a/system-config/configuration/laptop/default.nix +++ b/system-config/configuration/laptop/default.nix @@ -78,7 +78,7 @@ ollama.enable = true; wyoming = { enable = true; - satelliteOnly = true; + satelliteOnly = false; }; virtualization.homeassistant = { enable = true; diff --git a/system-config/services/containers/traefik/default.nix b/system-config/services/containers/traefik/default.nix index 5892c9e..3ee1fc0 100644 --- a/system-config/services/containers/traefik/default.nix +++ b/system-config/services/containers/traefik/default.nix @@ -30,26 +30,6 @@ containerPort = 9443; hostPort = 9443; } - { - containerPort = 8002; - hostPort = 8002; - } - { - containerPort = 8003; - hostPort = 8003; - } - { - containerPort = 8004; - hostPort = 8004; - } - { - containerPort = 8005; - hostPort = 8005; - } - - - - ]; bindMounts = { @@ -92,6 +72,7 @@ localsecure = { address = ":9443"; + asDefault = true; http.tls.certResolver = "cloudflare"; }; @@ -113,19 +94,6 @@ }; }; }; - openWakeWord = { - address = ":8002"; - }; - faster-whisper = { - address = ":8003"; - }; - ollama = { - address = ":8004"; - }; - piper = { - address = ":8005"; - }; - }; log = { level = "DEBUG"; @@ -154,30 +122,6 @@ }; dynamicConfigOptions = { - tcp = { - routers = { - openWakeWord = { - entryPoints = [ "openWakeWord" ]; - service = "openWakeWord"; - tls.certResolver = "cloudflare"; - }; - faster-whisper = { - entryPoints = [ "faster-whisper" ]; - service = "faster-whisper"; - tls.certResolver = "cloudflare"; - }; - ollama = { - entryPoints = [ "ollama" ]; - service = "ollama"; - tls.certResolver = "cloudflare"; - }; - piper = { - entryPoints = [ "piper" ]; - service = "piper"; - tls.certResolver = "cloudflare"; - }; - }; - }; http = { routers = { homepageSecure = { @@ -209,6 +153,12 @@ service = "homeassistant"; tls.certResolver = "cloudflare"; }; + ollama = { + entryPoints = [ "websecure" ]; + rule = "Host(`blunkall.us`) && Path(`/api/ollama`)"; + service = "ollama"; + tls.certResolver = "cloudflare"; + }; jellyfin = { entryPoints = [ "localsecure" "websecure" ]; rule = "Host(`jellyfin.blunkall.us`)"; @@ -315,10 +265,7 @@ homeassistant.loadBalancer.servers = [ { url = "http://192.168.100.10:8123"; } ]; - openWakeWord.loadBalancer.servers = [ { url = "tcp://192.168.100.10:11432"; } ]; - faster-whisper.loadBalancer.servers = [ { url = "tcp://192.168.100.10:11433"; } ]; ollama.loadBalancer.servers = [ { url = "tcp://192.168.100.10:11434"; } ]; - piper.loadBalancer.servers = [ { url = "tcp://192.168.100.10:11435"; } ]; }; }; };