feat(capytal,chat): discord bridge for the matrix server
This commit is contained in:
@@ -25,6 +25,49 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.mautrix-discord = let
|
||||
cfg = config.services.mautrix-discord;
|
||||
continuwuity = config.services.matrix-continuwuity.settings.global;
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
homeserver = {
|
||||
address = "http://localhost:${toString
|
||||
(builtins.elemAt continuwuity.port 0)}";
|
||||
domain = continuwuity.server_name;
|
||||
};
|
||||
appservice = rec {
|
||||
address = "http://localhost:${toString port}";
|
||||
hostname = "0.0.0.0";
|
||||
port = 9402;
|
||||
|
||||
database = {
|
||||
type = "sqlite3";
|
||||
uri = "file:${cfg.dataDir}/mautrix-discord.db?_txlock=immediate";
|
||||
max_open_conns = 20;
|
||||
max_idle_conns = 2;
|
||||
max_conn_idle_time = null;
|
||||
max_conn_lifetime = null;
|
||||
};
|
||||
id = "discord";
|
||||
bot = {
|
||||
username = "discordbot";
|
||||
displayname = "Discord bridge bot";
|
||||
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
|
||||
};
|
||||
ephemeral_events = true;
|
||||
async_transactions = false;
|
||||
};
|
||||
bridge = {
|
||||
permissions = {
|
||||
"*" = "relay";
|
||||
"${continuwuity.server_name}" = "user";
|
||||
"${continuwuity.well_known.support_mxid}" = "admin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts = {
|
||||
":${toString (config.services.capytalcc.web.port + 1)}".extraConfig = ''
|
||||
# Matrix configuration ---------------------------------------------------
|
||||
@@ -64,4 +107,5 @@
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = ["olm-3.2.16"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user