ejabberd: make config parameter nullable, so that the default bundled config can be used if none is given

This commit is contained in:
Sander van der Burg 2016-01-12 17:12:47 +00:00
parent e8a66aa4f3
commit 23772ef0a2

View File

@ -11,7 +11,7 @@ let
${cfg.ctlConfig} ${cfg.ctlConfig}
''; '';
ectl = ''${cfg.package}/bin/ejabberdctl --config "${cfg.configFile}" --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"''; ectl = ''${cfg.package}/bin/ejabberdctl ${if cfg.configFile == null then "" else "--config ${cfg.configFile}"} --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"'';
dumps = lib.concatMapStringsSep " " lib.escapeShellArg cfg.loadDumps; dumps = lib.concatMapStringsSep " " lib.escapeShellArg cfg.loadDumps;
@ -60,8 +60,9 @@ in {
}; };
configFile = mkOption { configFile = mkOption {
type = types.path; type = types.nullOr types.path;
description = "Configuration file for ejabberd in YAML format"; description = "Configuration file for ejabberd in YAML format";
default = null;
}; };
ctlConfig = mkOption { ctlConfig = mkOption {