summaryrefslogtreecommitdiffstats
path: root/tv/3modules/ejabberd
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-08-11 12:12:13 +0200
committermakefu <github@syntax-fehler.de>2020-08-11 12:12:13 +0200
commit4cb0ff12ba563693b6be7aac3c7cc8c6ce7a003c (patch)
tree2eceb32d72c1799938bce57240566ba576c2c3b4 /tv/3modules/ejabberd
parent93606315b99a2540c5859d93eb2377ae32fa6506 (diff)
parentf556a302f62434e0a47ef23db7e569bdb9c489f6 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/3modules/ejabberd')
-rw-r--r--tv/3modules/ejabberd/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix
index f16dfac86..aaf262fa1 100644
--- a/tv/3modules/ejabberd/default.nix
+++ b/tv/3modules/ejabberd/default.nix
@@ -18,6 +18,7 @@ in {
certfile = mkOption {
type = types.secret-file;
default = {
+ name = "ejabberd-certfile";
path = "${cfg.user.home}/ejabberd.pem";
owner = cfg.user;
source-path = toString <secrets> + "/ejabberd.pem";
@@ -26,6 +27,7 @@ in {
dhfile = mkOption {
type = types.secret-file;
default = {
+ name = "ejabberd-dhfile";
path = "${cfg.user.home}/dhparams.pem";
owner = cfg.user;
source-path = "/dev/null";
@@ -95,8 +97,15 @@ in {
systemd.services.ejabberd = {
wantedBy = [ "multi-user.target" ];
- requires = [ "secret.service" ];
- after = [ "network.target" "secret.service" ];
+ after = [
+ config.krebs.secret.files.ejabberd-certfile.service
+ config.krebs.secret.files.ejabberd-s2s_certfile.service
+ "network.target"
+ ];
+ partOf = [
+ config.krebs.secret.files.ejabberd-certfile.service
+ config.krebs.secret.files.ejabberd-s2s_certfile.service
+ ];
serviceConfig = {
ExecStartPre = "${gen-dhparam} ${cfg.dhfile.path}";
ExecStart = "${cfg.pkgs.ejabberd}/bin/ejabberdctl foreground";