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:
@@ -57,37 +57,51 @@ in
|
|||||||
appservice = lib.mkOption {
|
appservice = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
default = {
|
default = {
|
||||||
address = "http://localhost:8009";
|
address = "http://localhost:29334";
|
||||||
port = 8009;
|
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";
|
id = "discord";
|
||||||
bot = {
|
bot = {
|
||||||
username = "discordbot";
|
username = "discordbot";
|
||||||
displayname = "Discord bridge bot";
|
displayname = "Discord bridge bot";
|
||||||
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
|
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
|
||||||
};
|
};
|
||||||
as_token = "generate";
|
ephemeral_events = true;
|
||||||
hs_token = "generate";
|
async_transactions = false;
|
||||||
database = {
|
as_token = "This value is generated when generating the registration";
|
||||||
type = "sqlite3";
|
hs_token = "This value is generated when generating the registration";
|
||||||
uri = "file:/var/lib/mautrix-discord/mautrix-discord.db?_txlock=immediate";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
defaultText = lib.literalExpression ''
|
defaultText = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
address = "http://localhost:8009";
|
address = "http://localhost:29334";
|
||||||
port = 8009;
|
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";
|
id = "discord";
|
||||||
bot = {
|
bot = {
|
||||||
username = "discordbot";
|
username = "discordbot";
|
||||||
displayname = "Discord bridge bot";
|
displayname = "Discord bridge bot";
|
||||||
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
|
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
|
||||||
};
|
};
|
||||||
as_token = "generate";
|
ephemeral_events = true;
|
||||||
hs_token = "generate";
|
async_transactions = false;
|
||||||
database = {
|
as_token = "This value is generated when generating the registration";
|
||||||
type = "sqlite3";
|
hs_token = "This value is generated when generating the registration";
|
||||||
uri = "file:''${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
@@ -125,10 +139,12 @@ in
|
|||||||
prefix_webhook_messages = true;
|
prefix_webhook_messages = true;
|
||||||
enable_webhook_avatars = false;
|
enable_webhook_avatars = false;
|
||||||
use_discord_cdn_upload = true;
|
use_discord_cdn_upload = true;
|
||||||
|
#proxy =
|
||||||
cache_media = "unencrypted";
|
cache_media = "unencrypted";
|
||||||
direct_media = {
|
direct_media = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
server_name = "discord-media.example.com";
|
#server_name = "discord-media.example.com";
|
||||||
|
#well_known_response =
|
||||||
allow_proxy = true;
|
allow_proxy = true;
|
||||||
server_key = "generate";
|
server_key = "generate";
|
||||||
};
|
};
|
||||||
@@ -140,6 +156,13 @@ in
|
|||||||
fps = 25;
|
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";
|
command_prefix = "!discord";
|
||||||
management_room_text = {
|
management_room_text = {
|
||||||
welcome = "Hello, I'm a Discord bridge bot.";
|
welcome = "Hello, I'm a Discord bridge bot.";
|
||||||
@@ -199,8 +222,8 @@ in
|
|||||||
};
|
};
|
||||||
permissions = {
|
permissions = {
|
||||||
"*" = "relay";
|
"*" = "relay";
|
||||||
# "example.com" = "user";
|
#"example.com" = "user";
|
||||||
# "@admin:example.com": "admin";
|
#"@admin:example.com": "admin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
@@ -209,6 +232,22 @@ in
|
|||||||
for more information.
|
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 = { };
|
default = { };
|
||||||
@@ -225,7 +264,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
bridge.permissions = {
|
bridge.permissions = {
|
||||||
"example.com" = "full";
|
"example.com" = "user";
|
||||||
"@admin:example.com" = "admin";
|
"@admin:example.com" = "admin";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user