Describe the bug
In NixOS 22.05, the domain name is not set correctly when networking.enableIPv6 is set to false.
Steps To Reproduce
- It's working with IPv6:
{ networking.hostName = "foo"; networking.domain = "bar.baz"; networking.enableIPv6 = true; }
$ hostname --fqdn foo.bar.baz
- .. but broken without:
{ networking.hostName = "foo"; networking.domain = "bar.baz"; networking.enableIPv6 = false; }
$ hostname --fqdn foo
Expected behavior
Obviously, it should work in both cases.
Additional context
The issue seems to be related to nscd:
systemctl stop nscd also fixes the problem.
Similar issues seem to have been discussed in #1248, #10183 and #87633, but it's still broken.
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
- system: `"x86_64-linux"` - host os: `Linux 5.15.74, NixOS, 22.05 (Quokka), 22.05.3702.c5203abb132` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.8.1` - channels(root): `"nixos-22.05"` - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`