2022-06-22 20:09:30 +02:00
|
|
|
{ secrets, ... }:
|
|
|
|
{
|
|
|
|
services.mautrix-facebook = {
|
2023-07-12 01:53:04 +02:00
|
|
|
enable = false;
|
2022-06-22 20:09:30 +02:00
|
|
|
configurePostgresql = true;
|
|
|
|
|
|
|
|
registrationData = {
|
|
|
|
# NOTE: This is a randomly generated UUID
|
|
|
|
inherit (secrets.keys.matrix.mautrix-facebook) as_token;
|
|
|
|
inherit (secrets.keys.matrix.mautrix-facebook) hs_token;
|
|
|
|
};
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
homeserver = {
|
|
|
|
# TODO: connect via localhost
|
|
|
|
address = "https://matrix.nani.wtf";
|
|
|
|
domain = "nani.wtf";
|
|
|
|
};
|
|
|
|
|
|
|
|
appservice = rec {
|
|
|
|
address = "http://${hostname}:${toString port}";
|
|
|
|
bot_username = "facebookbot";
|
|
|
|
hostname = "0.0.0.0";
|
|
|
|
|
|
|
|
ephemeral_events = true;
|
|
|
|
|
|
|
|
port = secrets.ports.matrix.mautrix-facebook;
|
|
|
|
inherit (secrets.keys.matrix.mautrix-facebook) as_token;
|
|
|
|
inherit (secrets.keys.matrix.mautrix-facebook) hs_token;
|
|
|
|
};
|
|
|
|
|
|
|
|
bridge = {
|
|
|
|
encryption = {
|
|
|
|
allow = true;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
backfilling = {
|
|
|
|
initial_limit = 8000;
|
|
|
|
};
|
|
|
|
username_template = "facebook_{userid}";
|
|
|
|
sync_with_custom_puppets = false;
|
|
|
|
permissions = {
|
|
|
|
"@h7x4:nani.wtf" = "admin";
|
|
|
|
"nani.wtf" = "user";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
logging = {
|
|
|
|
formatters = {
|
|
|
|
journal_fmt = {
|
|
|
|
format = "%(name)s: %(message)s";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
handlers = {
|
|
|
|
journal = {
|
|
|
|
SYSLOG_IDENTIFIER = "mautrix-facebook";
|
|
|
|
class = "systemd.journal.JournalHandler";
|
|
|
|
formatter = "journal_fmt";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
handlers = [
|
|
|
|
"journal"
|
|
|
|
];
|
|
|
|
level = "INFO";
|
|
|
|
};
|
|
|
|
version = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
manhole = {
|
|
|
|
enabled = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
metrics = {
|
|
|
|
enabled = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|