mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-21 15:01:28 +01:00
networkd enables systemd-resolved by default, and resolved's own mDNS responder conflicts with avahi (duplicate answers, avahi logs 'Detected another mDNS stack running on this host'). Keep avahi for DNS-SD (cups-browsed depends on it) and turn resolved's mDNS off.
22 lines
672 B
Nix
22 lines
672 B
Nix
{
|
|
# Network discovery on a local network, mDNS
|
|
# With this enabled, you can access your machine at <hostname>.local
|
|
# it's more convenient than using the IP address.
|
|
# https://avahi.org/
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
publish = {
|
|
enable = true;
|
|
domain = true;
|
|
userServices = true;
|
|
};
|
|
};
|
|
|
|
# avahi and systemd-resolved both run an mDNS responder, which makes mDNS
|
|
# unreliable ("Detected another IPv4/IPv6 mDNS stack running on this host").
|
|
# Keep avahi (needed for DNS-SD, e.g. CUPS printer discovery) and turn off
|
|
# resolved's own mDNS.
|
|
services.resolved.settings.Resolve.MulticastDNS = false;
|
|
}
|