Skip to content

Commit d00ddcb

Browse files
authored
nixos/networking: allow users to override FQDN (#391522)
2 parents 3e5bb71 + 4d53772 commit d00ddcb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

nixos/modules/tasks/network-interfaces.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -578,21 +578,22 @@ in
578578
};
579579

580580
networking.fqdn = mkOption {
581-
readOnly = true;
582581
type = types.str;
583582
default =
584583
if (cfg.hostName != "" && cfg.domain != null) then
585584
"${cfg.hostName}.${cfg.domain}"
586585
else
587586
throw ''
588-
The FQDN is required but cannot be determined. Please make sure that
589-
both networking.hostName and networking.domain are set properly.
587+
The FQDN is required but cannot be determined from `networking.hostName`
588+
and `networking.domain`. Please ensure these options are set properly or
589+
set `networking.fqdn` directly.
590590
'';
591591
defaultText = literalExpression ''"''${networking.hostName}.''${networking.domain}"'';
592592
description = ''
593-
The fully qualified domain name (FQDN) of this host. It is the result
594-
of combining `networking.hostName` and `networking.domain.` Using this
595-
option will result in an evaluation error if the hostname is empty or
593+
The fully qualified domain name (FQDN) of this host. By default, it is
594+
the result of combining `networking.hostName` and `networking.domain.`
595+
596+
Using this option will result in an evaluation error if the hostname is empty or
596597
no domain is specified.
597598
598599
Modules that accept a mere `networking.hostName` but prefer a fully qualified

0 commit comments

Comments
 (0)