From 1247d7374e8af45b349c1d2f3efe1b61bcec8cc4 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Mon, 23 Mar 2026 21:18:57 -0400 Subject: [PATCH] hippocampus: matrix: discord bot? (fix parens again) --- .../servers/public/matrix/bots/discord.nix | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/machines/hippocampus/servers/public/matrix/bots/discord.nix b/machines/hippocampus/servers/public/matrix/bots/discord.nix index a5f23b7..61141e9 100644 --- a/machines/hippocampus/servers/public/matrix/bots/discord.nix +++ b/machines/hippocampus/servers/public/matrix/bots/discord.nix @@ -366,59 +366,59 @@ in { "@cyborgpotato:glia.club" = "admin"; }; }; - }; - appservice = { - # The address that the homeserver can use to connect to this appservice. - address = "http://localhost:${toString config.services.mautrix-discord.settings.appservice.port}"; + appservice = { + # The address that the homeserver can use to connect to this appservice. + address = "http://localhost:${toString config.services.mautrix-discord.settings.appservice.port}"; - # The hostname and port where this appservice should listen. - hostname = "0.0.0.0"; - port = 7193; + # The hostname and port where this appservice should listen. + hostname = "0.0.0.0"; + port = 7193; - # Database config. - # See definition at top of file - database = { - # The database type. "sqlite3-fk-wal" and "postgres" are supported. - type = "postgres"; - # The database URI. - # SQLite: A raw file path is supported, but `file:?_txlock=immediate` is recommended. - # https://github.com/mattn/go-sqlite3#connection-string - # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable - # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql - uri = "postgres:///${mautrix-discord-user}?host=/var/run/postgresql"; - # Maximum number of connections. Mostly relevant for Postgres. - max_open_conns = 20; - max_idle_conns = 2; - # Maximum connection idle time and lifetime before they're closed. Disabled if null. - # Parsed with https://pkg.go.dev/time#ParseDuration - max_conn_idle_time = null; - max_conn_lifetime = null; + # Database config. + # See definition at top of file + database = { + # The database type. "sqlite3-fk-wal" and "postgres" are supported. + type = "postgres"; + # The database URI. + # SQLite: A raw file path is supported, but `file:?_txlock=immediate` is recommended. + # https://github.com/mattn/go-sqlite3#connection-string + # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable + # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql + uri = "postgres:///${mautrix-discord-user}?host=/var/run/postgresql"; + # Maximum number of connections. Mostly relevant for Postgres. + max_open_conns = 20; + max_idle_conns = 2; + # Maximum connection idle time and lifetime before they're closed. Disabled if null. + # Parsed with https://pkg.go.dev/time#ParseDuration + max_conn_idle_time = null; + max_conn_lifetime = null; + }; + + # The unique ID of this appservice. + id = "discord"; + # Appservice bot details. + bot = { + # Username of the appservice bot. + username = "discordbot"; + # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty + # to leave display name/avatar as-is. + displayname = "Discord bridge bot"; + avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC"; + }; + + # Whether or not to receive ephemeral events via appservice transactions. + # Requires MSC2409 support (i.e. Synapse 1.22+). + ephemeral_events = true; + + # Should incoming events be handled asynchronously? + # This may be necessary for large public instances with lots of messages going through. + # However, messages will not be guaranteed to be bridged in the same order they were sent in. + async_transactions = false; + + # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. + as_token = "$MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN"; + hs_token = "$MAUTRIX_DISCORD_APPSERVICE_HS_TOKEN"; }; - - # The unique ID of this appservice. - id = "discord"; - # Appservice bot details. - bot = { - # Username of the appservice bot. - username = "discordbot"; - # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty - # to leave display name/avatar as-is. - displayname = "Discord bridge bot"; - avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC"; - }; - - # Whether or not to receive ephemeral events via appservice transactions. - # Requires MSC2409 support (i.e. Synapse 1.22+). - ephemeral_events = true; - - # Should incoming events be handled asynchronously? - # This may be necessary for large public instances with lots of messages going through. - # However, messages will not be guaranteed to be bridged in the same order they were sent in. - async_transactions = false; - - # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. - as_token = "$MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN"; - hs_token = "$MAUTRIX_DISCORD_APPSERVICE_HS_TOKEN"; }; serviceDependencies = [ config.services.mautrix-discord.registrationServiceUnit ] ++ (lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)