4 enable = lib.mkDefault true;
5 nssmdns4 = lib.mkDefault true;
6 # UsageWarning: Due to the fact that most mDNS responders only register local IPv4 addresses,
7 # most user want to leave this option disabled to avoid long timeouts
8 # when applications first resolve the none existing IPv6 address.
9 nssmdns6 = lib.mkDefault false;
10 # Disabling this setting also disables discovering of network devices.
11 openFirewall = lib.mkDefault true;
12 publish.enable = lib.mkDefault false;
14 environment.etc."mdns.allow".text = ''
18 networking.nftables.ruleset = lib.mkIf config.services.avahi.enable (
22 skuid ${config.users.users.avahi.name} udp sport mdns udp dport mdns counter accept comment "Avahi: MulticastDNS"
26 + lib.optionalString config.services.avahi.openFirewall ''
29 udp dport mdns counter accept comment "Avahi: MulticastDNS"