aboutsummaryrefslogtreecommitdiff
path: root/vps-configuration.env.nix
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-09-06 08:34:36 -0300
committerEuAndreh <eu@euandre.org>2020-09-06 08:43:08 -0300
commit4419a3d0758bdd6ee2cda07a4c68da28beb64eaf (patch)
treee1f2ffd43d49c19add2ad292b5f99999c3e9d61d /vps-configuration.env.nix
parentAdd mediator documentation (diff)
downloadserver-4419a3d0758bdd6ee2cda07a4c68da28beb64eaf.tar.gz
server-4419a3d0758bdd6ee2cda07a4c68da28beb64eaf.tar.xz
Use dynamic toggle for prosody
Diffstat (limited to 'vps-configuration.env.nix')
-rw-r--r--vps-configuration.env.nix26
1 files changed, 14 insertions, 12 deletions
diff --git a/vps-configuration.env.nix b/vps-configuration.env.nix
index e25b63f..d5a7f54 100644
--- a/vps-configuration.env.nix
+++ b/vps-configuration.env.nix
@@ -37,6 +37,7 @@ let
prosodyMUCTLD = "$PROSODY_MUC_TLD";
prosodyPort = "$PROSODY_PORT";
prosodyHTTPPort = "$PROSODY_HTTP_PORT";
+ prosodyEnable = $PROSODY_ENABLE;
};
staticSiteFromRepo = repoName:
pkgs.stdenv.mkDerivation {
@@ -100,17 +101,18 @@ in {
# HTTP and HTPPS: NGINX
80
443
-
- # XMPP: Prosody
- # https://prosody.im/doc/ports
- 5000
- 5222
- 5269
- 5280
- 5281
- 5347
- 5582
- ];
+ ] ++ (if prosodyEnable then
+ [
+ # XMPP: Prosody
+ # https://prosody.im/doc/ports
+ 5000
+ 5222
+ 5269
+ 5280
+ 5281
+ 5347
+ 5582
+ ] else []);
security.acme = {
acceptTerms = true;
@@ -274,7 +276,7 @@ in {
"/var/lib/acme/${envsubstConfiguration.prosodyConverseTLD}/key.pem";
};
in {
- enable = false;
+ enable = prosodyEnable;
admins = [ envsubstConfiguration.prosodyAdminUser ];
allowRegistration = false;
modules = { websocket = true; };