services: matrix add mautrix-telegram

This commit is contained in:
Kabbone 2022-12-29 12:01:12 +01:00
parent 8ee8de4d3f
commit 2cba5cc41e
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
3 changed files with 92 additions and 22 deletions

View File

@ -71,6 +71,11 @@ in {
}
];
};
# app_service_config_files = [
# "/var/lib/matrix-synapse/whatsapp-registration.yaml"
# "/var/lib/matrix-synapse/telegram-registration.yaml"
# "/var/lib/matrix-synapse/signal-registration.yaml"
# ];
extraConfigFiles = [
config.age.secrets."services/matrix/synapse.yml".path
];
@ -87,26 +92,90 @@ in {
};
};
# users = {
# users = {
# mautrix_whatsapp = {
# uid = 3001;
# group = "mautrix_whatsapp";
# isSystemUser = true;
# };
# mautrix_telegram = {
# uid = 3002;
# group = "matrix_appservice_slack";
# isSystemUser = true;
# };
# };
# groups = {
# mautrix_whatsapp = {
# gid = 3001;
# };
# mautrix_telegram = {
# gid = 3002;
# };
# };
# };
users = {
users = {
mautrix_whatsapp = {
uid = 3001;
group = "mautrix_whatsapp";
isSystemUser = true;
};
mautrix_telegram = {
uid = 3002;
group = "mautrix_telegram";
isSystemUser = true;
};
mautrix_signal = {
uid = 3003;
group = "mautrix_signal";
isSystemUser = true;
};
};
groups = {
mautrix_whatsapp = {
gid = 3001;
};
mautrix_telegram = {
gid = 3002;
};
mautrix_signal = {
gid = 3003;
};
};
};
services = {
mautrix-telegram = {
enable = true;
environmentFile = config.age.secrets."services/matrix/mautrix-telegram.env".path
settings = {
homeserver = {
address = "http://localhost:8008";
domain = "kabtop.de";
};
appservice = {
hostname = "127.0.0.1";
database = "postgres://${mautrixteledb}";
provisioning.enabled = false;
id = "telegram";
public = {
enabled = false;
};
};
bridge = {
sync_channel_members = true;
startup_sync = true;
public_portals = true;
double_puppet_server_map = {
"kabtop.de: https://kabtop.de";
};
encryption = {
allow = true;
default = true;
verification_levels = {
receive = "cross-signed-untrusted";
send = "cross-signed-untrusted";
};
};
private_chat_portal_meta = true;
backfill = {
disable_notifications = true;
};
permissions = {
"@kabbone:kabtop.de" = "admin";
};
};
telegram = {
api_id = ${telegram-api_id};
api_hash = ${telegram-api_hash};
bot_token = ${telegram-bot_token};
};
};
};
};
age.secrets."services/matrix/mautrix-telegram.env" = {
file = ../../../secrets/services/matrix/mautrix-telegram.age;
owner = "mautrix-telegram";
};
}

View File

@ -34,6 +34,7 @@ in
"services/postgresql/initScript.age".publicKeys = servers ++ users;
"services/coturn/static-auth.age".publicKeys = servers ++ users;
"services/matrix/synapse.age".publicKeys = servers ++ users;
"services/matrix/mautrix-telegram.age".publicKeys = servers ++ users;
"services/nextcloud/adminpassFile.age".publicKeys = servers ++ users;
"services/nextcloud/dbpassFile.age".publicKeys = servers ++ users;
}

Binary file not shown.