add mautrix-telegram
This commit is contained in:
parent
c6a78dc807
commit
3c3c98cf12
4 changed files with 74 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
./services/mastodon.nix
|
||||
./services/rspamd.nix
|
||||
./services/dendrite.nix
|
||||
./services/mautrix-telegram.nix
|
||||
];
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
|
|
@ -15,7 +15,12 @@
|
|||
};
|
||||
private_key = config.sops.secrets."services/dendrite/private_key".path;
|
||||
};
|
||||
app_service_api.database.connection_string = "postgresql:///dendrite_app_service?sslmode=disable&host=/run/postgresql";
|
||||
app_service_api.database = {
|
||||
connection_string = "postgresql:///dendrite_app_service?sslmode=disable&host=/run/postgresql";
|
||||
config_files = [
|
||||
"/var/lib/mautrix-telegram"
|
||||
];
|
||||
};
|
||||
client_api = {
|
||||
registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
|
||||
};
|
||||
|
|
63
config/services/mautrix-telegram.nix
Normal file
63
config/services/mautrix-telegram.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, ... }: {
|
||||
services.mautrix-telegram = {
|
||||
enable = true;
|
||||
environmentFile = config.sops.secrets."services/mautrix/telegram".path;
|
||||
settings = {
|
||||
homeserver = {
|
||||
address = "https://matrix.chir.rs";
|
||||
domain = "chir.rs";
|
||||
http_retry_count = 1000;
|
||||
async_media = true;
|
||||
};
|
||||
appservice = {
|
||||
hostname = "127.0.0.1";
|
||||
port = 29317;
|
||||
max_body_size = 10;
|
||||
database = "postgres:///mautrix_telegram?sslmode=disable&host=/run/postgresql";
|
||||
as_token = "$AS_TOKEN";
|
||||
as_token = "$HS_TOKEN";
|
||||
};
|
||||
bridge = {
|
||||
displayname_template = "{displayname}";
|
||||
allow_avatar_remove = true;
|
||||
max_initial_member_sync = -1;
|
||||
sync_create_limit = 0;
|
||||
sync_direct_chats = true;
|
||||
sync_direct_chat_list = true;
|
||||
double_puppet_server_map = {
|
||||
chir.rs = "https://matrix.chir.rs";
|
||||
};
|
||||
double_puppet_allow_discovery = true;
|
||||
invite_link_resolve = true;
|
||||
animated_sticker.target = webm;
|
||||
encryption = {
|
||||
allow = true;
|
||||
default = true;
|
||||
keysharing.allow = true;
|
||||
};
|
||||
delivery_receipts = true;
|
||||
delivery_error_reports = true;
|
||||
pinned_tag = "m.favourite";
|
||||
archive_tag = "m.lowpriority";
|
||||
permissions = {
|
||||
"@lotte:chir.rs" = "admin";
|
||||
};
|
||||
};
|
||||
telegram = {
|
||||
api_id = "$API_ID";
|
||||
api_hash = "$API_HASH";
|
||||
connection.retries = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
config.sops.secrets."services/mautrix/telegram".owner = "mautrix-telegram";
|
||||
services.postgresql.ensureDatabases = [
|
||||
"mautrix_telegram"
|
||||
];
|
||||
services.postgresql.ensureUsers = [{
|
||||
name = "mautrix-telegram";
|
||||
ensurePermissions = {
|
||||
"DATABASE mautrix_telegram" = "ALL PRIVILEGES";
|
||||
};
|
||||
}];
|
||||
}
|
|
@ -5,6 +5,8 @@ services:
|
|||
dendrite:
|
||||
secrets: ENC[AES256_GCM,data:NTm9xCA51s3ASIhIKy/wET4MqNQ=,iv:ktv+IAtbFTu6MI7HfKnT8a4m9KnFiA3hbOrhUFG6sUw=,tag:X/6O6iheQ24KbFl7XFOJpw==,type:str]
|
||||
private_key: ENC[AES256_GCM,data:WODNoOxyNF0TjS98abNseCsXrAPQpNRGAg7qUKLxc0MaSnq4OxXQvP4jZ/AFQeOOyy1J0OeKnzg4WSiOXMWVf1+WCy4OL2IOIQQa733BTLhBsl3OzvZ/wKN0aLSdnTN32bN7srUkPTxhAE9C1eHApW0v7/mxxo4XUHcVViy2Lhq4n09LxswgHOY=,iv:G7ovMcU+Fs41OV9Prqi9NoxBiwciIBdFi/YPswBemdU=,tag:QmNsYGrPjJKY+Uss5ZMuTg==,type:str]
|
||||
mautrix:
|
||||
telegram: ENC[AES256_GCM,data:yTqqbqW5DrplbLB7kqiw14AvoyiYPzcSggvtB5d+1rIV7i7Mc1WlY48EiqHLDnAOdno+brb3nZcRPepGDTl5FIkV4HD/uUi6szRcmSgTj0iqcv0pR4lHe1wHp0+sujbVuhnKaXo1OhbWhXbQvrOVB3LSzGx9CpiafcQsU8DSfh/zW0NL0DJls55HiYygySehhyarMarxyaBzPmHkFK/Q+bNbEw==,iv:5QcTWb81pnaV9E+awgjxcoyXy8VsNk9vZNWW/+BP/Dk=,tag:05yNTh5XI+VUFy/YJY95kw==,type:str]
|
||||
hydra:
|
||||
cache-key: ENC[AES256_GCM,data:359HiOnMunY5vQowyl79OOYX7ELs1jGkyCMjvuUXUaVnPWu/Nui5UM51O4VKD6+cLvVKyy5QXJxxOVfPO5DHL7gb+rlcbcusdBs8iCLaqlxD7yHqDE6FsncFSB7OqqUKNw==,iv:/NBm6p/vpurdhFzrN7HA9Tu13g6FbWREbKh4yNPryB4=,tag:xTs/KwTOgAQwaukU8+ek0A==,type:str]
|
||||
gitea_token: ENC[AES256_GCM,data:v0Ej8841I1F/dK5ZplRzZlvngpueMQKspM5USzX9VkOEmpCs2NA3+Q==,iv:fZisAuyqk7ATFx6qHYkScUeS8SsikjiPzVovZjGnUYM=,tag:7+O+Sn7unPDy88a6T70Jmg==,type:str]
|
||||
|
@ -56,8 +58,8 @@ sops:
|
|||
WnV3QWxtalIzWFdoQmpDTmJsNGdNOW8K++rFGXy0G6Gcu2gQwSP6xfXInQ/y5nh5
|
||||
2oGp8sfOLFWnNI4SWL0ChP47K3C/9ysUHwQnUYPbRafZ/4X6cN40ZQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2022-04-29T20:26:18Z"
|
||||
mac: ENC[AES256_GCM,data:/1akUfawMsiMKOZ6N+C1MsEHMukrKXDe+lqlIG1KvShjTvDhko6b2YQMc2jKckk+lfVnIqCyR0HK6iToZbr++8KOBql1c4Q7DW37PC2tGhFrb8j5bCKj2Eo/pRR1RIw0WqAliWQoW+a85A4gg0XlGNPO47i2u7e1NYxBFqcxIkY=,iv:J8FNX3Ihio+Esfe23wY/p8R+Xn6em9Fn/74AWzXZfP4=,tag:bRw1Tw/khmjW8E12MH3NLQ==,type:str]
|
||||
lastmodified: "2022-04-30T19:57:17Z"
|
||||
mac: ENC[AES256_GCM,data:aHZ+471rA/7Jwodn30HzoTORbJQY4442xCZRP74Pa86YoJN4i6htjeC6Oo8o7H5UHe4koICETRVjMIzvulktrE6Arhry1pDAy3tFEGS7RAognEI4HxTNnrx6oHFy8+Oi17Gz/VRZm/PfSmcudCX8UELQo93SLox+7+T1J+gk+ts=,iv:dMBucnZvgWXLw4Gz6faX0GDk4o5J29p+iMWDwwBRUeA=,tag:PIA37qLYUfpkapfbzDD3Lw==,type:str]
|
||||
pgp:
|
||||
- created_at: "2022-04-24T10:34:20Z"
|
||||
enc: |
|
||||
|
|
Loading…
Reference in a new issue