Skip to content

Instantly share code, notes, and snippets.

@washort
Created August 29, 2023 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save washort/00aa0a679cbce308f154ab084203aac2 to your computer and use it in GitHub Desktop.
Save washort/00aa0a679cbce308f154ab084203aac2 to your computer and use it in GitHub Desktop.
{ config, lib, pkgs, ... }:
{
users.users.matrix-appservice-irc.extraGroups = [ "matrix-synapse" ];
systemd.services.matrix-appservice-irc.serviceConfig.SystemCallFilter =
[ "@chown" ];
services.matrix-appservice-irc = {
enable = true;
needBindingCap = true;
registrationUrl = "http://127.0.0.1:8009";
settings = {
homeserver = {
domain = config.private.domain;
url = "http://127.0.0.1:8008";
dropMatrixMessagesAfterSec = 3600;
};
permissions."@washort:greyface.org" = "admin";
database.engine = "postgres";
database.connectionString =
"postgres://ircbridge:ǝƃpᴉɹqɔɹᴉ@127.0.0.1:5432/ircbridge";
ircService = {
ident.enabled = true;
ident.port = 113;
servers = {
"irc.libera.chat" = {
port = 6697;
ssl = true;
name = "Libera Chat";
botConfig = {
enabled = true;
nick = "greyfacebot";
username = "greyfacebot";
};
membershipLists.enabled = true;
membershipLists.global = {
ircToMatrix = {
initial = true;
incremental = true;
};
matrixToIrc = {
initial = true;
incremental = true;
};
};
mappings."#techcrap".roomIds =
[ "!QCafiEFbubOVVRqOmf:greyface.org" ];
matrixClients.userTemplate = "@libera_$NICK";
};
};
};
metrics.enabled = true;
debugApi.enable = true;
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment