74 lines
No EOL
1.7 KiB
Nix
74 lines
No EOL
1.7 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
services.ergochat = {
|
|
enable = true;
|
|
settings = {
|
|
network.name = "cultist.club";
|
|
server = {
|
|
name = "irc.cultist.club";
|
|
listeners = {
|
|
":6667" = {};
|
|
":6697" = {
|
|
tls = {
|
|
cert = "/var/lib/acme/cultist.club/fullchain.pem";
|
|
key = "/var/lib/acme/cultist.club/key.pem";
|
|
};
|
|
};
|
|
};
|
|
casemapping = "permissive";
|
|
enforce-utf8 = true;
|
|
motd = "/etc/ergo/motd.txt";
|
|
};
|
|
accounts = {
|
|
registration = {
|
|
enabled = true;
|
|
allow-before-connect = true;
|
|
};
|
|
authentication-enabled = true;
|
|
};
|
|
channels = {
|
|
default-modes = "+nt";
|
|
registration = {
|
|
enabled = true;
|
|
};
|
|
};
|
|
history = {
|
|
enabled = true;
|
|
channel-length = 2048;
|
|
client-length = 256;
|
|
chathistory-maxmessages = 100;
|
|
retention = {
|
|
allow-individual-delete = false;
|
|
cutoff = "720h";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.etc."ergo/motd.txt".text = ''
|
|
welcome to the cult
|
|
'';
|
|
|
|
systemd.services.ergochat = {
|
|
after = [ "acme-finished-cultist.club.target" ];
|
|
wants = [ "acme-finished-cultist.club.target" ];
|
|
serviceConfig = {
|
|
DynamicUser = lib.mkForce false;
|
|
User = "ergochat";
|
|
Group = "ergochat";
|
|
SupplementaryGroups = [ "acme" ];
|
|
StateDirectory = "ergo";
|
|
ReadOnlyPaths = [ "/var/lib/acme/cultist.club" ];
|
|
};
|
|
};
|
|
|
|
security.acme.certs."cultist.club".postRun = "systemctl restart ergochat.service";
|
|
|
|
users.users.ergochat = {
|
|
isSystemUser = true;
|
|
group = "ergochat";
|
|
extraGroups = [ "acme" ];
|
|
};
|
|
users.groups.ergochat = {};
|
|
} |