Merge pull request #194759 from hercules-ci/fqdn-or-hostname
nixos: Add `networking.fqdnOrHostName`
This commit is contained in:
@@ -60,11 +60,8 @@ in {
|
||||
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if config.networking.domain != null then
|
||||
config.networking.fqdn
|
||||
else
|
||||
config.networking.hostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdn";
|
||||
default = config.networking.fqdnOrHostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdnOrHostName";
|
||||
example = "bookstack.example.com";
|
||||
description = lib.mdDoc ''
|
||||
The hostname to serve BookStack on.
|
||||
|
||||
@@ -42,11 +42,8 @@ in
|
||||
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if config.networking.domain != null then
|
||||
config.networking.fqdn
|
||||
else
|
||||
config.networking.hostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdn";
|
||||
default = config.networking.fqdnOrHostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdnOrHostName";
|
||||
example = "discourse.example.com";
|
||||
description = lib.mdDoc ''
|
||||
The hostname to serve Discourse on.
|
||||
|
||||
@@ -12,8 +12,6 @@ let
|
||||
phpExecutionUnit = "phpfpm-${pool}";
|
||||
databaseService = "mysql.service";
|
||||
|
||||
fqdn = if config.networking.domain != null then config.networking.fqdn else config.networking.hostName;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "services" "piwik" "enable" ] [ "services" "matomo" "enable" ])
|
||||
@@ -77,11 +75,9 @@ in {
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.str;
|
||||
default = "${user}.${fqdn}";
|
||||
default = "${user}.${config.networking.fqdnOrHostName}";
|
||||
defaultText = literalExpression ''
|
||||
if config.${options.networking.domain} != null
|
||||
then "${user}.''${config.${options.networking.fqdn}}"
|
||||
else "${user}.''${config.${options.networking.hostName}}"
|
||||
"${user}.''${config.${options.networking.fqdnOrHostName}}"
|
||||
'';
|
||||
example = "matomo.yourdomain.org";
|
||||
description = lib.mdDoc ''
|
||||
|
||||
@@ -54,11 +54,8 @@ in {
|
||||
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if config.networking.domain != null then
|
||||
config.networking.fqdn
|
||||
else
|
||||
config.networking.hostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdn";
|
||||
default = config.networking.fqdnOrHostName;
|
||||
defaultText = lib.literalExpression "config.networking.fqdnOrHostName";
|
||||
example = "snipe-it.example.com";
|
||||
description = lib.mdDoc ''
|
||||
The hostname to serve Snipe-IT on.
|
||||
|
||||
Reference in New Issue
Block a user