feat(capytal,chat): whatsapp bridge for the matrix server
This commit is contained in:
@@ -68,6 +68,43 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.mautrix-whatsapp = let
|
||||
# cfg = config.services.mautrix-whatsapp;
|
||||
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 = 9403;
|
||||
|
||||
id = "whatsapp";
|
||||
bot = {
|
||||
username = "whatsappbot";
|
||||
displayname = "WhatsApp bridge bot";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
permissions = {
|
||||
"*" = "relay";
|
||||
"${continuwuity.server_name}" = "user";
|
||||
"${continuwuity.well_known.support_mxid}" = "admin";
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
type = "sqlite3-fk-wal";
|
||||
uri = "file:/var/lib/mautrix-whatsapp/mautrix-whatsapp.db?_txlock=immediate";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts = {
|
||||
":${toString (config.services.capytalcc.web.port + 1)}".extraConfig = ''
|
||||
# Matrix configuration ---------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user