hippocampus: matrix: discord bot? (fix parens)

This commit is contained in:
2026-03-23 21:17:22 -04:00
parent 6d2cc86b65
commit 23f314a4ee

View File

@@ -337,88 +337,88 @@ in {
# You should not enable this option unless you understand all the implications. # You should not enable this option unless you understand all the implications.
disable_device_change_key_rotation = false; disable_device_change_key_rotation = false;
}; };
};
# Settings for provisioning API # Settings for provisioning API
provisioning = { provisioning = {
# Prefix for the provisioning API paths. # Prefix for the provisioning API paths.
prefix = "/_matrix/provision"; prefix = "/_matrix/provision";
# Shared secret for authentication. If set to "generate", a random secret will be generated, # Shared secret for authentication. If set to "generate", a random secret will be generated,
# or if set to "disable", the provisioning API will be disabled. # or if set to "disable", the provisioning API will be disabled.
shared_secret = "generate"; shared_secret = "generate";
# Enable debug API at /debug with provisioning authentication. # Enable debug API at /debug with provisioning authentication.
debug_endpoints = false; debug_endpoints = false;
}; };
# Permissions for using the bridge. # Permissions for using the bridge.
# Permitted values: # Permitted values:
# relay - Talk through the relaybot (if enabled), no access otherwise # relay - Talk through the relaybot (if enabled), no access otherwise
# user - Access to use the bridge to chat with a Discord account. # user - Access to use the bridge to chat with a Discord account.
# admin - User level and some additional administration tools # admin - User level and some additional administration tools
# Permitted keys: # Permitted keys:
# * - All Matrix users # * - All Matrix users
# domain - All users on that homeserver # domain - All users on that homeserver
# mxid - Specific user # mxid - Specific user
permissions = { permissions = {
"*" = "relay"; "*" = "relay";
"glia.club" = "user"; "glia.club" = "user";
"@admin:glia.club" = "admin"; "@admin:glia.club" = "admin";
"@cyborgpotato:glia.club" = "admin"; "@cyborgpotato:glia.club" = "admin";
};
}; };
}; };
appservice = { };
# The address that the homeserver can use to connect to this appservice. appservice = {
address = "http://localhost:${toString config.services.mautrix-discord.settings.appservice.port}"; # 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. # The hostname and port where this appservice should listen.
hostname = "0.0.0.0"; hostname = "0.0.0.0";
port = 7193; port = 7193;
# Database config. # Database config.
# See definition at top of file # See definition at top of file
database = { database = {
# The database type. "sqlite3-fk-wal" and "postgres" are supported. # The database type. "sqlite3-fk-wal" and "postgres" are supported.
type = "postgres"; type = "postgres";
# The database URI. # The database URI.
# SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended. # SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
# https://github.com/mattn/go-sqlite3#connection-string # https://github.com/mattn/go-sqlite3#connection-string
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable # 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 # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
uri = "postgres:///${mautrix-discord-user}?host=/var/run/postgresql"; uri = "postgres:///${mautrix-discord-user}?host=/var/run/postgresql";
# Maximum number of connections. Mostly relevant for Postgres. # Maximum number of connections. Mostly relevant for Postgres.
max_open_conns = 20; max_open_conns = 20;
max_idle_conns = 2; max_idle_conns = 2;
# Maximum connection idle time and lifetime before they're closed. Disabled if null. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
# Parsed with https://pkg.go.dev/time#ParseDuration # Parsed with https://pkg.go.dev/time#ParseDuration
max_conn_idle_time = null; max_conn_idle_time = null;
max_conn_lifetime = 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 ] serviceDependencies = [ config.services.mautrix-discord.registrationServiceUnit ]
++ (lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit) ++ (lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)