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
networking: Set networking.search to [domain] by default #94986
base: master
Are you sure you want to change the base?
Conversation
Currently it is impossible to set `networking.search` to an empty list: in this case the option will not appear in the config at all, which is semantically different from having `search` with an empty list in resolv.conf. There is a workaround – set `networking.search = ["."]`, but it is not very obvious. Change the logic of resolv.conf generation to always include the `search` option and instead default it to `networking.domain` in the NixOS module. * For people who had `networking.search` unset, this will set it to the list consisting of their domain, which will result in `search <networking.domain>` being added to their `resolv.conf`, which is equivalent to having `search` option, i.e. the behaviour will not change. * For people who set `networking.search` to a non-empty list exactly the same resolv.conf as before will be generated. * For people who set `networking.search = []` previously this would have no effect, now it will actually result in the empty search list in their resolv.conf, which is, arguably, what they expect.
cc @wkennington as the author and @7c6f434c as the merger of #2380. |
I think empty |
Yes, I mean, explicitly putting an empty |
Apparently, |
@kirelagin please resolve the merge conflict. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
The net effect of this PR is that it allows setting
networking.search = []
. Please, see the commit message for details.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)