Add a Discord/Matrix bridge
This commit is contained in:
parent
b627d552b5
commit
a15a93a317
|
@ -24,8 +24,8 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
nur,
|
||||
blender-bin,
|
||||
nixos-mailserver,
|
||||
blender-bin,
|
||||
home-manager,
|
||||
...
|
||||
} @inputs: let
|
||||
|
|
Binary file not shown.
|
@ -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 ];
|
||||
|
|
18
nixos/server/matrix-discord.nix
Normal file
18
nixos/server/matrix-discord.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue