From b47ca1475decf1a98f10231f0cbeebfb75e7f6ea Mon Sep 17 00:00:00 2001 From: yokai Date: Tue, 4 Aug 2026 16:58:39 -0500 Subject: common: share LAN discovery settings Move ping and Avahi/mDNS configuration into a shared LAN discovery module so kusanagi and enzo both publish their .local names, resolve each other on the LAN, and answer ping. Keep mDNS scoped to the shared Wi-Fi interface instead of using Avahi's global firewall helper. Assisted-by: OpenAI:gpt-5 --- machines/enzo/default.nix | 8 -------- machines/kusanagi/desktop.nix | 15 --------------- 2 files changed, 23 deletions(-) (limited to 'machines') diff --git a/machines/enzo/default.nix b/machines/enzo/default.nix index 86a05d3..3246ca3 100644 --- a/machines/enzo/default.nix +++ b/machines/enzo/default.nix @@ -58,14 +58,6 @@ "hwebs" ]; - # mDNS client: resolve *.local names on the LAN (kusanagi, NAS, etc.). - # Kusanagi already advertises via Avahi; this side just needs NSS - # resolution so kusanagi.local resolves without an SSH config hostname. - services.avahi = { - enable = true; - nssmdns4 = true; - }; - # Wifi is managed from the CLI (nmcli/nmtui); trim the rest. networking.modemmanager.enable = false; # no cellular modem diff --git a/machines/kusanagi/desktop.nix b/machines/kusanagi/desktop.nix index 8e1eb8c..44b9c81 100644 --- a/machines/kusanagi/desktop.nix +++ b/machines/kusanagi/desktop.nix @@ -22,21 +22,6 @@ drivers = with pkgs; [ gutenprint ]; }; - # mDNS: publish kusanagi.local and resolve *.local LAN names. - # Keep the firewall opening scoped to the Wi-Fi LAN interface. - networking.firewall.interfaces.wlp8s0.allowedUDPPorts = [ 5353 ]; - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = false; - allowInterfaces = [ "wlp8s0" ]; - publish = { - enable = true; - addresses = true; - workstation = true; - }; - }; - # prevent auto-mounting optical disks services.udisks2.enable = true; -- cgit v1.3