-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/avahi: fix nss module #99530
nixos/avahi: fix nss module #99530
Conversation
mdns_minimal must be placed before resolve in nsswitch.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me.
Hmm I need to give this a bit of thought, If you don't explicitly disable the responder (by setting @lopsided98 if you set Also see the notes about this in the Arch wiki : https://wiki.archlinux.org/index.php/Avahi OTOH the arch wiki has the same order as you're proposing here; so this is probably fine? |
I don't think resolved's mDNS support is on by default, is it? The per-link setting defaults to off. I have Avahi enabled without touching resolved's settings and it works fine. In any case, this PR just means that Avahi will preferred over resolved for mDNS resolution if both are enabled. |
This allows testing avahi works with resolved being enabled, as a regression test for #99530.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-make-systemd-resolved-and-mdns-work-together/10910/2 |
mdns_minimal
must be placed beforeresolve
in nsswitch.conf. This was broken by #86940 or #87016, when the config was split up into multiple modules and the ordering was lost. This PR usesmkOrder
to restore the correct ordering.This PR ends up placing
mymachines
betweenmdns_minimal
andresolve
, but I believe this is fine. My understanding of the problem is thatresolve
responds to all hostnames, so.local
domains currently never make it tomdns_minimal
. On the other hand,mdns_minimal
only responds to.local
domains and all other are passed on to the next module. So as long as a systemd container doesn't have a.local
domain there shouldn't be a problem.Fixes #98050.
cc @flokli
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)