From 23772ef0a26fe631cde87690ecc586c598e2f3d9 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Tue, 12 Jan 2016 17:12:47 +0000 Subject: ejabberd: make config parameter nullable, so that the default bundled config can be used if none is given --- nixos/modules/services/networking/ejabberd.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix index a990200f44c6..7af11f37a43c 100644 --- a/nixos/modules/services/networking/ejabberd.nix +++ b/nixos/modules/services/networking/ejabberd.nix @@ -11,7 +11,7 @@ let ${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; @@ -60,8 +60,9 @@ in { }; configFile = mkOption { - type = types.path; + type = types.nullOr types.path; description = "Configuration file for ejabberd in YAML format"; + default = null; }; ctlConfig = mkOption { -- cgit 1.4.1