From a60834e4c6ce9798585e71a25825a595ccddd202 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Jun 2025 20:04:29 +0200 Subject: ejabberd: export HOME Ejabberd 25.04 (and likely earlier versions) require the HOME directory to be defined in order to start. Without it, ejabberd will abort with following error message: [critical] Failed to start ejabberd application: Exception occurred during configuration processing. This is most likely due to faulty/incompatible validator in third-party code. If you are not running any third-party code, please report the bug with ejabberd configuration file attached and the following stacktrace included: ** exception error: no match of right hand side value error in function ejabberd_config:get_predefined_keywords/1 (/build/source/src/ejabberd_config.erl, line 506) in call from ejabberd_config:validators/3 (/build/source/src/ejabberd_config.erl, line 593) in call from ejabberd_config:'-validators/2-fun-0-'/4 (/build/source/src/ejabberd_config.erl, line 366) in call from lists:foldl/3 (lists.erl, line 2146) in call from ejabberd_config:validators/2 (/build/source/src/ejabberd_config.erl, line 364) in call from ejabberd_config:validate/1 (/build/source/src/ejabberd_config.erl, line 710) in call from ejabberd_config:read_file/2 (/build/source/src/ejabberd_config.erl, line 637) in call from ejabberd_config:load_file/1 (/build/source/src/ejabberd_config.erl, line 737) References https://github.com/processone/ejabberd/issues/4402 --- modules/ejabberd/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/ejabberd/default.nix b/modules/ejabberd/default.nix index 02c060d..48a662f 100644 --- a/modules/ejabberd/default.nix +++ b/modules/ejabberd/default.nix @@ -131,6 +131,9 @@ in { systemd.services.ejabberd = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; + environment = { + HOME = cfg.stateDir; + }; reloadTriggers = [ config.environment.etc."ejabberd/ejabberd.yaml".source config.environment.etc."ejabberd/ejabberdctl.cfg".source -- cgit v1.2.3