From a7adbd5063fe7ab428d8174cb9b31bec2c6133d6 Mon Sep 17 00:00:00 2001 From: yokai Date: Tue, 4 Aug 2026 17:05:42 -0500 Subject: common: parameterize LAN discovery interface Let the shared LAN discovery module use each host's Wi-Fi interface instead of assuming kusanagi's wlp8s0 everywhere. Set kusanagi to wlp8s0 and enzo to wlp1s0. Reuse the same setting for kusanagi's Ollama LAN firewall rule so the service opening stays tied to the declared LAN interface. Assisted-by: OpenAI:gpt-5 --- machines/kusanagi/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'machines/kusanagi/default.nix') diff --git a/machines/kusanagi/default.nix b/machines/kusanagi/default.nix index a1d4610..867a5eb 100644 --- a/machines/kusanagi/default.nix +++ b/machines/kusanagi/default.nix @@ -1,7 +1,7 @@ # kusanagi — AMD workstation. Everything here is specific to this machine: # ROCm/GPU, the Focusrite Scarlett audio interface, optical-disc archiving, the # NAS mounts, and the Kavita/Immich/Ollama servers. -{ pkgs, ... }: +{ config, pkgs, ... }: { imports = [ @@ -18,10 +18,11 @@ sandbox.owner = "henz"; networking.hostName = "kusanagi"; + lanDiscovery.interface = "wlp8s0"; # Ollama is served on the Wi-Fi LAN only. Tailscale remains governed by ACLs # plus the host firewall because tailscale0 is not a trusted interface. - networking.firewall.interfaces.wlp8s0.allowedTCPPorts = [ 11434 ]; + networking.firewall.interfaces.${config.lanDiscovery.interface}.allowedTCPPorts = [ 11434 ]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions -- cgit v1.3