1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Alyssa Ross e9eff47002 nixos/networking: don't add extra names to ::1
From hosts(5):

> For each host a single line should be present with the following
> information:
>
>               IP_address canonical_hostname [aliases...]

With lines like "::1 localhost ahost.adomin ahost", we were saying
that the canonical name for "ahost" was "localhost", the opposite of a
canonical name.  This is why a second loopback address (127.0.0.2) is
used for hostnames with IPv4 — if they were put after "localhost" on
the 127.0.0.1 line, the same thing would happen.  With IPv6 we can't
do the same thing as there's only a single loopback address, so
instead the right thing to do is to simply not list the hostnames in
/etc/hosts, and rely on the myhostname NSS plugin, which will handle
this correctly.

(Note that the examples in hosts(5) also do not include IPv6 FQDN or
hostname entries.)
2024-12-11 11:09:40 +01:00
Jade Lovelace 9067ecf283 nixos/tests: fix hostname under network-online dep fix [BROKEN] 2024-01-18 16:28:42 -08:00
Florian Klink 5566961d2e nixosTests.hostname: stop using deprecated nodes.machine.config
Module argument `nodes.machine.config` is deprecated.
2023-03-07 13:29:19 +01:00
Florian Klink 27eab436bd nixos/tests/hostname.nix: nixpkgs-fmt 2023-03-07 13:29:19 +01:00
Robert Hensing aa0f27abb0 treewide: machine -> nodes.machine 2022-03-28 14:11:58 +02:00
Florian Klink b2f3bd4d79
Merge pull request #100155 from primeos/nixos-add-fqdn-option
nixos/networking: Add a read-only option for the FQDN
2021-01-25 16:45:45 +01:00
Dominik Xaver Hörl 25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00
Michael Weiss 971f0b45ef
nixos/networking: Add a read-only option for the FQDN
This is a convenience option that can be used to quickly obtain the
configured FQDN.
2020-10-12 15:27:31 +02:00
Julian Stecklina 837ec31493
nixos/tests/hostname: init (check system's host name)
NixOS currently has issues with setting the FQDN of a system in a way
where standard tools work. In order to help with experimentation and
avoid regressions, add a test that checks that the hostname is
reported as the user wanted it to be.

Co-authored-by: Michael Weiss <dev.primeos@gmail.com>
2020-05-25 18:13:14 +02:00