From 9a53b3a8b2983158efc449675b8d1391c3bf1a6c Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 16 Oct 2023 13:43:18 +0200 Subject: [PATCH] Switch Azedia from resolved to avahi. --- .bauke/nix/azedia/programs-services.nix | 13 ++++++++++--- .bauke/nix/azedia/system.nix | 23 ----------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/.bauke/nix/azedia/programs-services.nix b/.bauke/nix/azedia/programs-services.nix index f2ec5e0..4f6d8f0 100644 --- a/.bauke/nix/azedia/programs-services.nix +++ b/.bauke/nix/azedia/programs-services.nix @@ -8,9 +8,16 @@ }; services = { - openssh.enable = true; + avahi = { + enable = true; + nssmdns = true; + publish = { + addresses = true; + domain = true; + enable = true; + }; + }; - # Enable `resolved` so the `.local` domain works. - resolved.enable = true; + openssh.enable = true; }; } diff --git a/.bauke/nix/azedia/system.nix b/.bauke/nix/azedia/system.nix index df481ca..5ab1bc7 100644 --- a/.bauke/nix/azedia/system.nix +++ b/.bauke/nix/azedia/system.nix @@ -39,29 +39,6 @@ networking = { hostName = "azedia"; - firewall = { - # * 22 is for SSH. - # * 53, 5353 and 5355 are for `resolved` so we can access the server via - # the `.local` domain. Maybe not all of the ports are needed - # but having them all makes it work. - # * 80 and 443 are for Caddy HTTP and HTTPS access respectively. - allowedTCPPorts = [ 22 53 5353 5355 80 443 ]; - allowedUDPPorts = [ 22 53 5353 5355 80 443 ]; - }; - - # It probably isn't necessary to manually set the IPs but do it anyway just - # in case if something else gets messed up they at least stay the same. Both - # IPs are the original ones that were automatically assigned. - interfaces.wlan0.ipv4.addresses = [{ - address = "192.168.0.202"; - prefixLength = 24; - }]; - - interfaces.wlan0.ipv6.addresses = [{ - address = "2a02:1810:9c2d:6b00:afd9:d79c:644d:f12f"; - prefixLength = 64; - }]; - wireless = { enable = true; # The "wireless.env" should have "HOME_SSID=name" and "HOME_PSK=password"