nixos: Add networking.fqdnOrHostName option, readOnly
This commit is contained in:
parent
b7a6fde153
commit
f43716f28e
@ -479,6 +479,22 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
networking.fqdnOrHostName = mkOption {
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = if cfg.domain == null then cfg.hostName else cfg.fqdn;
|
||||
defaultText = literalExpression ''
|
||||
if cfg.domain == null then cfg.hostName else cfg.fqdn
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Either the fully qualified domain name (FQDN), or just the host name if
|
||||
it does not exists.
|
||||
|
||||
This is a convenience option for modules to read instead of `fqdn` when
|
||||
a mere `hostName` is also an acceptable value.
|
||||
'';
|
||||
};
|
||||
|
||||
networking.hostId = mkOption {
|
||||
default = null;
|
||||
example = "4e98920d";
|
||||
|
Loading…
Reference in New Issue
Block a user