From 4a600af1b139c2b6df1ea22809a3fad584684207 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 10 Oct 2020 15:27:47 +0200 Subject: [PATCH] doc: Document a workaround for using an FQDN as hostname Since #76542 this workaround is required to use a FQDN as hostname. See #94011 and #94022 for the related discussion. Due to some potential/unresolved issues (legacy software, backward compatibility, etc.) we're documenting this workaround [0]. [0]: https://github.com/NixOS/nixpkgs/issues/94011#issuecomment-705952300 --- nixos/doc/manual/release-notes/rl-2009.xml | 8 ++++++-- nixos/modules/tasks/network-interfaces.nix | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index 21686841c28..91a01f0835a 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -605,8 +605,8 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ]; In addition to the hostname, the fully qualified domain name (FQDN), - which consists of ${cfg.hostName} and - ${cfg.domain} is now added to + which consists of ${networking.hostName} and + ${networking.domain} is now added to /etc/hosts, to allow local FQDN resolution, as used by the hostname --fqdn command and other applications that try to determine the FQDN. These new entries take precedence over entries @@ -626,6 +626,10 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ]; or digit, and have as interior characters only letters, digits, and hyphen. The maximum length is 63 characters. Additionally it is recommended to only use lower-case characters. + If (e.g. for legacy reasons) a FQDN is required as the Linux kernel network node hostname + (uname --nodename) the option + boot.kernel.sysctl."kernel.hostname" + can be used as a workaround (but be aware of the 64 character limit). diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 5ddb12d15c3..e5bd5775368 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -391,6 +391,10 @@ in end with a letter or digit, and have as interior characters only letters, digits, and hyphen. The maximum length is 63 characters. Additionally it is recommended to only use lower-case characters. + If (e.g. for legacy reasons) a FQDN is required as the Linux kernel + network node hostname (uname --nodename) the option + boot.kernel.sysctl."kernel.hostname" can be used as a workaround (but + the 64 character limit still applies). ''; };