diff options
author | EuAndreh <eu@euandre.org> | 2020-08-18 08:56:26 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-19 06:59:53 -0300 |
commit | 21ebd9be57a8dcdc97d333c6cf2ba19d2642f405 (patch) | |
tree | b3e56b88f10beacc42c7aa5f87f6261c8e87e082 /vps-configuration.env.nix | |
parent | Checkpoint: working matterbridge server (diff) | |
download | server-21ebd9be57a8dcdc97d333c6cf2ba19d2642f405.tar.gz server-21ebd9be57a8dcdc97d333c6cf2ba19d2642f405.tar.xz |
Checkpoint: Shut down Prosody and matterbridge
Full reasoning under "Decisions" section inside TODOs.org.
Diffstat (limited to 'vps-configuration.env.nix')
-rw-r--r-- | vps-configuration.env.nix | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/vps-configuration.env.nix b/vps-configuration.env.nix index 831a714..f5a9122 100644 --- a/vps-configuration.env.nix +++ b/vps-configuration.env.nix @@ -5,7 +5,6 @@ let TLD = "$TLD"; nextcloudTLD = "$NEXTCLOUD_TLD"; gitTLD = "$GIT_TLD"; - prosodyTLD = "$PROSODY_TLD"; bonecoTLD = "$BONECO_TLD"; letsencryptEmail = "$LETSENCRYPT_EMAIL"; authorizedKey = "$AUTHORIZED_KEY"; @@ -19,18 +18,6 @@ let gitRoot = "$GIT_ROOT"; gitPort = "$GIT_PORT"; systemStateVersion = "$SYSTEM_STATE_VERSION"; - prosodyAdminUser = "$PROSODY_ADMIN_USER"; - prosodyMUCTLD = "$PROSODY_MUC_TLD"; - prosodyPort = "$PROSODY_PORT"; - prosodyHTTPPort = "$PROSODY_HTTP_PORT"; - matterbridgeTelegramToken = "$MATTERBRIDGE_TELEGRAM_TOKEN"; - matterbridgeTelegramChannel = "$MATTERBRIDGE_TELEGRAM_CHANNEL"; - matterbridgeBotJID = "$MATTERBRIDGE_BOT_JID"; - matterbridgeBotPassword = "$MATTERBRIDGE_BOT_PASSWORD"; - matterbridgeBotNick = "$MATTERBRIDGE_BOT_NICK"; - matterbridgeMUCServer = "$MATTERBRIDGE_MUC_SERVER"; - matterbridgeXMPPServer = "$MATTERBRIDGE_XMPP_SERVER"; - matterbridgeXMPPChannel = "$MATTERBRIDGE_XMPP_CHANNEL"; }; boneco = pkgs.stdenv.mkDerivation { name = "boneco"; @@ -66,16 +53,6 @@ in { # HTTP and HTPPS: NGINX 80 443 - - # XMPP: Prosody - # https://prosody.im/doc/ports - 5000 - 5222 - 5269 - 5280 - 5281 - 5347 - 5582 ]; security.acme = { @@ -113,17 +90,6 @@ in { enableACME = true; root = boneco; }; - "${envsubstConfiguration.prosodyTLD}" = { - forceSSL = true; - enableACME = true; - serverAliases = [ envsubstConfiguration.prosodyMUCTLD ]; - locations = { - "/" = { - proxyPass = - "http://localhost:${envsubstConfiguration.prosodyHTTPPort}/"; - }; - }; - }; }; }; @@ -157,67 +123,6 @@ in { }; }; - prosody = let - fullchainPEM = - "/var/lib/acme/${envsubstConfiguration.prosodyTLD}/fullchain.pem"; - keyPEM = "/var/lib/acme/${envsubstConfiguration.prosodyTLD}/key.pem"; - in { - enable = true; - admins = [ envsubstConfiguration.prosodyAdminUser ]; - allowRegistration = false; - modules = { websocket = true; }; - package = pkgs.prosody.override { - withCommunityModules = [ "http_upload" "conversejs" "bookmarks" ]; - }; - extraModules = [ "http_upload" "conversejs" "bookmarks" ]; - ssl = { - cert = fullchainPEM; - key = keyPEM; - }; - virtualHosts = { - "${envsubstConfiguration.prosodyTLD}" = { - enabled = true; - domain = "${envsubstConfiguration.prosodyTLD}"; - ssl = { - cert = fullchainPEM; - key = keyPEM; - }; - }; - }; - # muc = [{ - # domain = envsubstConfiguration.prosodyMUCTLD; - # }]; - }; - - matterbridge = { - enable = true; - configFile = '' - [telegram.mytelegram] - Token="${envsubstConfiguration.matterbridgeTelegramToken}" - RemoteNickFormat="[{PROTOCOL}] <{NICK}>" - - [xmpp.myxmpp] - Server="${envsubstConfiguration.matterbridgeXMPPServer}" - Jid="${envsubstConfiguration.matterbridgeBotJID}" - Password="${envsubstConfiguration.matterbridgeBotPassword}" - Muc="${envsubstConfiguration.matterbridgeMUCServer}" - Nick="${envsubstConfiguration.matterbridgeBotNick}" - RemoteNickFormat="[{PROTOCOL}] <{NICK}>" - - [[gateway]] - name="gateway1" - enable=true - - [[gateway.inout]] - account="telegram.mytelegram" - channel="${envsubstConfiguration.matterbridgeTelegramChannel}" - - [[gateway.inout]] - account="xmpp.myxmpp" - channel="${envsubstConfiguration.matterbridgeXMPPChannel}" - ''; - }; - lighttpd = { enable = true; port = pkgs.lib.toInt envsubstConfiguration.gitPort; |