This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs.services.matrix.bridges.mautrix-discord: add

+59
+1
machines/neoprism/config.nix
··· 19 19 ../../2configs/services/matrix/bridges/mautrix-signal.nix 20 20 ../../2configs/services/matrix/bridges/heisenbridge.nix 21 21 ../../2configs/services/matrix/bridges/mautrix-telegram.nix 22 + ../../2configs/services/matrix/bridges/mautrix-discord.nix 22 23 23 24 ../../2configs/services/pad 24 25
+58
2configs/services/matrix/bridges/mautrix-discord.nix
··· 1 + { ... }: 2 + { 3 + services.mautrix-discord = { 4 + enable = true; 5 + registerToSynapse = true; 6 + settings = { 7 + homeserver = { 8 + address = "http://[::1]:8008"; 9 + domain = "lassul.us"; 10 + }; 11 + # `settings.{homeserver,appservice,bridge,logging}` use `types.attrs` with 12 + # full defaults, so this is a shallow merge — set keys override the 13 + # default's same-level keys, but nested subtrees we redefine (database, 14 + # bot, encryption, permissions) replace the default's subtree wholesale. 15 + appservice = { 16 + address = "http://127.0.0.1:29334"; 17 + hostname = "127.0.0.1"; 18 + port = 29334; 19 + database = { 20 + type = "postgres"; 21 + uri = "postgres:///mautrix-discord?host=/run/postgresql"; 22 + }; 23 + id = "discord"; 24 + bot = { 25 + username = "discordbot"; 26 + displayname = "Discord bridge bot"; 27 + avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC"; 28 + }; 29 + ephemeral_events = true; 30 + }; 31 + bridge = { 32 + username_template = "discord_{{.}}"; 33 + displayname_template = "{{if .Webhook}}Webhook{{else}}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{{end}} (D)"; 34 + delivery_receipts = false; 35 + message_status_events = false; 36 + encryption = { 37 + allow = false; 38 + default = false; 39 + require = false; 40 + }; 41 + permissions = { 42 + "lassul.us" = "user"; 43 + "@lassulus:lassul.us" = "admin"; 44 + }; 45 + }; 46 + }; 47 + }; 48 + 49 + services.postgresql = { 50 + ensureDatabases = [ "mautrix-discord" ]; 51 + ensureUsers = [ 52 + { 53 + name = "mautrix-discord"; 54 + ensureDBOwnership = true; 55 + } 56 + ]; 57 + }; 58 + }