diff --git a/quinn/etc/nixos/configuration.nix b/quinn/etc/nixos/configuration.nix index 7a46979..f9e2e40 100644 --- a/quinn/etc/nixos/configuration.nix +++ b/quinn/etc/nixos/configuration.nix @@ -145,6 +145,20 @@ # List services that you want to enable: + services.avahi = { + enable = true; + ipv6 = true; + ipv4 = true; + nssmdns4 = true; + nssmdns6 = true; + publish = { + addresses = true; + enable = true; + hinfo = true; + }; + }; + + services.nginx = { enable = true; virtualHosts."pihole.home.arpa" = { @@ -200,7 +214,7 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; - # Disable the resolved stub listener, let Pihole do it + # Disable the resolved stub listener, let Pihole bind port 53 on all interfaces. services.resolved = { extraConfig = '' DNSStubListener=no @@ -241,8 +255,8 @@ networking.firewall = { enable = false; allowPing = true; - allowedTCPPorts = [ 80 443 ]; - allowedUDPPortRanges = [ + allowedTCPPorts = [ 80 443 5353 ]; + allowedUDPPortRanges = [ 5353 #{ from = 4000; to = 4007; } #{ from = 8000; to = 8010; } ]; @@ -288,6 +302,8 @@ DHCP = "ipv4"; # accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC) IPv6AcceptRA = true; + # Allow mDNS .local address resolution + MulticastDNS = true; }; addresses = [{ addressConfig = {