Matrix: Difference between revisions
imported>Pacien mautrix-telegram: add config for animated stickers conversion |
imported>Pacien m fold lines |
||
Line 94: | Line 94: | ||
==== mautrix-telegram ==== | ==== mautrix-telegram ==== | ||
Full configuration reference: https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/example-config.yaml | Full configuration reference: | ||
https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/example-config.yaml | |||
Example NixOS config: | Example NixOS config: | ||
Line 103: | Line 104: | ||
enable = true; | enable = true; | ||
app_service_config_files = [ | app_service_config_files = [ | ||
# The registration file is automatically generated after starting the appservice for the first time. | # The registration file is automatically generated after starting the | ||
# cp /var/lib/mautrix-telegram/telegram-registration.yaml /var/lib/matrix-synapse/ | # appservice for the first time. | ||
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/telegram-registration.yaml | # cp /var/lib/mautrix-telegram/telegram-registration.yaml \ | ||
# /var/lib/matrix-synapse/ | |||
# chown matrix-synapse:matrix-synapse \ | |||
# /var/lib/matrix-synapse/telegram-registration.yaml | |||
"/var/lib/matrix-synapse/telegram-registration.yaml" | "/var/lib/matrix-synapse/telegram-registration.yaml" | ||
]; | ]; | ||
Line 113: | Line 117: | ||
services.mautrix-telegram = { | services.mautrix-telegram = { | ||
enable = true; | enable = true; | ||
environmentFile = /etc/secrets/mautrix-telegram.env; | |||
# The appservice is pre-configured to use SQLite by default. It's also possible to use PostgreSQL. | # file containing the appservice and telegram tokens | ||
environmentFile = /etc/secrets/mautrix-telegram.env; | |||
# The appservice is pre-configured to use SQLite by default. | |||
# It's also possible to use PostgreSQL. | |||
settings = { | settings = { | ||
homeserver = { | homeserver = { | ||
Line 129: | Line 137: | ||
}; | }; | ||
# The service uses SQLite by default, but it's also possible to use PostgreSQL instead: | # The service uses SQLite by default, but it's also possible to use | ||
# PostgreSQL instead: | |||
#database = "postgresql:///mautrix-telegram?host=/run/postgresql"; | #database = "postgresql:///mautrix-telegram?host=/run/postgresql"; | ||
}; | }; | ||
Line 138: | Line 147: | ||
}; | }; | ||
# Animated stickers conversion requires additional packages in the service's path. | # Animated stickers conversion requires additional packages in the | ||
# service's path. | |||
# If this isn't a fresh installation, clearing the bridge's uploaded | # If this isn't a fresh installation, clearing the bridge's uploaded | ||
# file cache might be necessary (make a database backup first!): | # file cache might be necessary (make a database backup first!): | ||
Line 176: | Line 186: | ||
==== matrix-appservice-discord ==== | ==== matrix-appservice-discord ==== | ||
Full configuration reference: https://github.com/Half-Shot/matrix-appservice-discord/blob/master/config/config.sample.yaml | Full configuration reference: | ||
https://github.com/Half-Shot/matrix-appservice-discord/blob/master/config/config.sample.yaml | |||
Example NixOS config: | Example NixOS config: | ||
Line 185: | Line 196: | ||
enable = true; | enable = true; | ||
app_service_config_files = [ | app_service_config_files = [ | ||
# The registration file is automatically generated after starting the appservice for the first time. | # The registration file is automatically generated after starting the | ||
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/ | # appservice for the first time. | ||
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml | # cp /var/lib/matrix-appservice-discord/discord-registration.yaml \ | ||
# /var/lib/matrix-synapse/ | |||
# chown matrix-synapse:matrix-synapse \ | |||
# /var/lib/matrix-synapse/discord-registration.yaml | |||
"/var/lib/matrix-synapse/discord-registration.yaml" | "/var/lib/matrix-synapse/discord-registration.yaml" | ||
]; | ]; | ||
Line 196: | Line 210: | ||
enable = true; | enable = true; | ||
environmentFile = /etc/keyring/matrix-appservice-discord/tokens.env; | environmentFile = /etc/keyring/matrix-appservice-discord/tokens.env; | ||
# The appservice is pre-configured to use SQLite by default. It's also possible to use PostgreSQL. | # The appservice is pre-configured to use SQLite by default. | ||
# It's also possible to use PostgreSQL. | |||
settings = { | settings = { | ||
bridge = { | bridge = { | ||
Line 203: | Line 218: | ||
}; | }; | ||
# The service uses SQLite by default, but it's also possible to use PostgreSQL instead: | # The service uses SQLite by default, but it's also possible to use | ||
# PostgreSQL instead: | |||
#database = { | #database = { | ||
# filename = ""; # empty value to disable sqlite | # filename = ""; # empty value to disable sqlite |