Add a Discord/Matrix bridge

This commit is contained in:
Jimbo 2024-08-27 05:14:19 -04:00
parent b627d552b5
commit a15a93a317
5 changed files with 31 additions and 3 deletions

View file

@ -24,8 +24,8 @@
self,
nixpkgs,
nur,
blender-bin,
nixos-mailserver,
blender-bin,
home-manager,
...
} @inputs: let

Binary file not shown.

View file

@ -21,7 +21,6 @@
./server/acme.nix
./server/ddclient.nix
./server/docker.nix
./server/element.nix
./server/firewall.nix
./server/gitea.nix
./server/lemmy.nix
@ -33,10 +32,14 @@
./server/nginx.nix
./server/owncast.nix
./server/pufferpanel.nix
./server/synapse.nix
./server/tandoor.nix
./server/vaultwarden.nix
./server/misc.nix
# Matrix
./server/synapse.nix
./server/element.nix
./server/matrix-discord.nix
];
services.openssh.ports = [ 2222 ];

View file

@ -0,0 +1,18 @@
let
secrets = import ../modules/secrets.nix;
in {
services.matrix-appservice-discord = {
enable = true;
settings = {
auth = {
clientID = "${secrets.discordBotID}";
botToken = "${secrets.discordBotToken}";
usePrivilegedIntents = true;
};
bridge = {
domain = "${secrets.jimDomain}";
homeserverUrl = "https://matrix.${secrets.jimDomain}";
};
};
};
}

View file

@ -32,6 +32,13 @@ in {
require_transport_security = true;
};
# Allows a Discord/Matrix bridge, comment on first use and copy using instructions
app_service_config_files = [
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
"/var/lib/matrix-synapse/discord-registration.yaml"
];
# Disable registration without email
registrations_require_3pid = [ "email" ];