aboutsummaryrefslogtreecommitdiff
path: root/vps-configuration.env.nix
diff options
context:
space:
mode:
Diffstat (limited to 'vps-configuration.env.nix')
-rw-r--r--vps-configuration.env.nix46
1 files changed, 44 insertions, 2 deletions
diff --git a/vps-configuration.env.nix b/vps-configuration.env.nix
index dad3a9c..831a714 100644
--- a/vps-configuration.env.nix
+++ b/vps-configuration.env.nix
@@ -21,8 +21,16 @@ let
systemStateVersion = "$SYSTEM_STATE_VERSION";
prosodyAdminUser = "$PROSODY_ADMIN_USER";
prosodyMUCTLD = "$PROSODY_MUC_TLD";
- prosodyHTTPUploadTLD = "$PROSODY_HTTP_UPLOAD_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";
@@ -108,6 +116,7 @@ in {
"${envsubstConfiguration.prosodyTLD}" = {
forceSSL = true;
enableACME = true;
+ serverAliases = [ envsubstConfiguration.prosodyMUCTLD ];
locations = {
"/" = {
proxyPass =
@@ -155,7 +164,8 @@ in {
in {
enable = true;
admins = [ envsubstConfiguration.prosodyAdminUser ];
- allowRegistration = true;
+ allowRegistration = false;
+ modules = { websocket = true; };
package = pkgs.prosody.override {
withCommunityModules = [ "http_upload" "conversejs" "bookmarks" ];
};
@@ -174,6 +184,38 @@ in {
};
};
};
+ # 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 = {