nixos/mautrix-discord: sync the default settings with the upstream example config

https://github.com/mautrix/discord/blob/main/example-config.yaml

I've changed the logging level to stdout+info only to match the other mautrix modules
This commit is contained in:
SchweGELBin
2025-07-19 17:26:41 +02:00
parent 2202440461
commit 80516f42f3

View File

@@ -57,37 +57,51 @@ in
appservice = lib.mkOption {
type = lib.types.attrs;
default = {
address = "http://localhost:8009";
port = 8009;
address = "http://localhost:29334";
hostname = "0.0.0.0";
port = 29334;
database = {
type = "sqlite3";
uri = "file:/var/lib/mautrix-discord/mautrix-discord.db?_txlock=immediate";
max_open_conns = 20;
max_idle_conns = 2;
max_conn_idle_time = null;
max_conn_lifetime = null;
};
id = "discord";
bot = {
username = "discordbot";
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
as_token = "generate";
hs_token = "generate";
database = {
type = "sqlite3";
uri = "file:/var/lib/mautrix-discord/mautrix-discord.db?_txlock=immediate";
};
ephemeral_events = true;
async_transactions = false;
as_token = "This value is generated when generating the registration";
hs_token = "This value is generated when generating the registration";
};
defaultText = lib.literalExpression ''
{
address = "http://localhost:8009";
port = 8009;
address = "http://localhost:29334";
hostname = "0.0.0.0";
port = 29334;
database = {
type = "sqlite3";
uri = "file:''${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate";
max_open_conns = 20;
max_idle_conns = 2;
max_conn_idle_time = null;
max_conn_lifetime = null;
};
id = "discord";
bot = {
username = "discordbot";
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
as_token = "generate";
hs_token = "generate";
database = {
type = "sqlite3";
uri = "file:''${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate";
};
ephemeral_events = true;
async_transactions = false;
as_token = "This value is generated when generating the registration";
hs_token = "This value is generated when generating the registration";
}
'';
description = ''
@@ -125,10 +139,12 @@ in
prefix_webhook_messages = true;
enable_webhook_avatars = false;
use_discord_cdn_upload = true;
#proxy =
cache_media = "unencrypted";
direct_media = {
enabled = false;
server_name = "discord-media.example.com";
#server_name = "discord-media.example.com";
#well_known_response =
allow_proxy = true;
server_key = "generate";
};
@@ -140,6 +156,13 @@ in
fps = 25;
};
};
double_puppet_server_map = {
#"example.com" = "https://example.com";
};
double_puppet_allow_discovery = false;
login_shared_secret_map = {
#"example.com" = "foobar";
};
command_prefix = "!discord";
management_room_text = {
welcome = "Hello, I'm a Discord bridge bot.";
@@ -199,8 +222,8 @@ in
};
permissions = {
"*" = "relay";
# "example.com" = "user";
# "@admin:example.com": "admin";
#"example.com" = "user";
#"@admin:example.com": "admin";
};
};
description = ''
@@ -209,6 +232,22 @@ in
for more information.
'';
};
logging = lib.mkOption {
type = lib.types.attrs;
default = {
min_level = "info";
writers = lib.singleton {
type = "stdout";
format = "pretty-colored";
time_format = " ";
};
};
description = ''
Logging configuration.
See [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml)
for more information.
'';
};
};
};
default = { };
@@ -225,7 +264,7 @@ in
};
bridge.permissions = {
"example.com" = "full";
"example.com" = "user";
"@admin:example.com" = "admin";
};
}