However, it still seems safer to include libnss-myhostname than not to, e.g. in case a different resolver with different behavior is installed. (Although the default nsswitch.conf configuration may still prefer DNS over this module, so maybe it's not actually useful?)
I wasn't entirely sure which metapackage this would fit best in, so I put it next to an existing libnss- package. Engineering feedback is welcome.
This allows removing /etc/hosts from the default configuration. Ref: https://github.com/pop-os/systemd/issues/5
While testing, I did find that systemd-resolved seems to resolve the hostname (along with
localhost
) even withoutlibnss-myhostname
installed: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#Synthetic%20RecordsHowever, it still seems safer to include
libnss-myhostname
than not to, e.g. in case a different resolver with different behavior is installed. (Although the defaultnsswitch.conf
configuration may still prefer DNS over this module, so maybe it's not actually useful?)I wasn't entirely sure which metapackage this would fit best in, so I put it next to an existing
libnss-
package. Engineering feedback is welcome.