tsuki/matrix/matrix-appservice-irc: enable lainchan irc bouncer
This commit is contained in:
parent
68b181fc05
commit
dddc92877c
|
@ -1,13 +1,77 @@
|
||||||
{ secrets, ... }:
|
{ config, secrets, ... }: let
|
||||||
{
|
cfg = config.services.matrix-appservice-irc;
|
||||||
|
in {
|
||||||
services.matrix-appservice-irc = {
|
services.matrix-appservice-irc = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
registrationUrl = "http://localhost:${toString cfg.port}";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
homeserver = {
|
||||||
|
url = "https://matrix.nani.wtf";
|
||||||
|
domain = "nani.wtf";
|
||||||
|
enablePresence = true;
|
||||||
|
};
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
engine = "postgres";
|
engine = "postgres";
|
||||||
connectionString = "postgres://matrix-appservice-irc:@localhost:${toString secrets.ports.postgres}/matrix-appservice-irc?sslmode=disable";
|
connectionString = "postgres://matrix-appservice-irc:@localhost:${toString secrets.ports.postgres}/matrix-appservice-irc?sslmode=disable";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ircService.servers."irc.lainchan.org" = {
|
||||||
|
name = "lainchan";
|
||||||
|
port = 6697;
|
||||||
|
ssl = true;
|
||||||
|
networkId = "ircLainchanOrg";
|
||||||
|
|
||||||
|
botConfig.enable = false;
|
||||||
|
|
||||||
|
dynamicChannels = {
|
||||||
|
enabled = true;
|
||||||
|
createAlias = true;
|
||||||
|
aliasTemplate = "#lainchanirc_$CHANNEL";
|
||||||
|
published = true;
|
||||||
|
useHomeserverDirectory = true;
|
||||||
|
joinRule = "public";
|
||||||
|
federate = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
matrixClients = {
|
||||||
|
userTemplate = "@lainanon_$NICK";
|
||||||
|
};
|
||||||
|
|
||||||
|
ircClients = {
|
||||||
|
nickTemplate = "$LOCALPART[m]";
|
||||||
|
allowNickChanges = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
membershipLists = {
|
||||||
|
enabled = true;
|
||||||
|
global = {
|
||||||
|
ircToMatrix = {
|
||||||
|
initial = true;
|
||||||
|
incremental = true;
|
||||||
|
};
|
||||||
|
matrixToIrc = {
|
||||||
|
initial = true;
|
||||||
|
incremental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
permissions."@h7x4:nani.wtf" = "admin";
|
||||||
|
|
||||||
|
# TODO: Port forward
|
||||||
|
ident.enable = true;
|
||||||
|
|
||||||
|
# TODO: Metrics
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.matrix-appservice-irc = {
|
||||||
|
requires = [
|
||||||
|
"matrix-synapse.service"
|
||||||
|
"postgresql.service"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./bridges/mautrix-facebook.nix
|
./bridges/mautrix-facebook.nix
|
||||||
./bridges/mx-puppet-discord.nix
|
./bridges/mx-puppet-discord.nix
|
||||||
# TODO: fix irc service
|
./bridges/matrix-appservice-irc.nix
|
||||||
# ./bridges/matrix-appservice-irc.nix
|
|
||||||
|
|
||||||
./postgres.nix
|
./postgres.nix
|
||||||
./coturn.nix
|
./coturn.nix
|
||||||
|
@ -58,6 +57,7 @@
|
||||||
enable_registration = false;
|
enable_registration = false;
|
||||||
|
|
||||||
registration_shared_secret = secrets.keys.matrix.registration-shared-secret;
|
registration_shared_secret = secrets.keys.matrix.registration-shared-secret;
|
||||||
|
allow_public_rooms_over_federation = true;
|
||||||
|
|
||||||
# password_config.enabled = lib.mkForce false;
|
# password_config.enabled = lib.mkForce false;
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@
|
||||||
"/var/lib/matrix-synapse/discord-registration.yaml"
|
"/var/lib/matrix-synapse/discord-registration.yaml"
|
||||||
# (pkgs.writeText "facebook-registrations.yaml" (builtins.toJSON config.services.mautrix-facebook.registrationData))
|
# (pkgs.writeText "facebook-registrations.yaml" (builtins.toJSON config.services.mautrix-facebook.registrationData))
|
||||||
"/var/lib/matrix-synapse/facebook-registration.yaml"
|
"/var/lib/matrix-synapse/facebook-registration.yaml"
|
||||||
|
"/var/lib/matrix-synapse/irc-registration.yml"
|
||||||
];
|
];
|
||||||
|
|
||||||
# redis.enabled = true;
|
# redis.enabled = true;
|
||||||
|
|
Loading…
Reference in New Issue