treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression using the ubiquitous `cfg` shortcut bindings.
This commit is contained in:
@@ -4,6 +4,7 @@ let
|
||||
json = pkgs.formats.json {};
|
||||
|
||||
cfg = config.services.discourse;
|
||||
opt = options.services.discourse;
|
||||
|
||||
# Keep in sync with https://github.com/discourse/discourse_docker/blob/master/image/base/Dockerfile#L5
|
||||
upstreamPostgresqlVersion = lib.getVersion pkgs.postgresql_13;
|
||||
@@ -399,6 +400,7 @@ in
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = cfg.hostname;
|
||||
defaultText = lib.literalExpression "config.${opt.hostname}";
|
||||
description = ''
|
||||
HELO domain to use for outgoing mail.
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user