summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/networking/ejabberd.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix
index a990200f44c..7af11f37a43 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 {