1
Fork 0
satellite/hosts/nixos/lapetus/services/pounce.nix

29 lines
847 B
Nix
Raw Normal View History

2024-01-31 21:59:11 +01:00
{ config, ... }:
let makeNetworkConfig = host: port: join: secret: {
content = ''
sasl-plain = prescientmoon:${config.sops.placeholder.${secret}}
2024-01-31 23:00:39 +01:00
nick = prescientmoon
2024-01-31 21:59:11 +01:00
host = ${host}
port = ${toString port}
join = ${join}
'';
owner = config.services.pounce.user;
};
in
{
security.acme.certs."wildcard-irc.moonythm.dev" = {
2024-01-31 22:09:04 +01:00
group = config.services.pounce.user;
2024-01-31 21:59:11 +01:00
domain = "*.irc.moonythm.dev";
};
sops.secrets.tilde_irc_pass.sopsFile = ../secrets.yaml;
sops.templates."pounce-tilde.cfg" = makeNetworkConfig "eu.tilde.chat" 6697 "#meta" "tilde_irc_pass";
2024-01-31 22:09:04 +01:00
services.pounce = {
enable = true;
externalHost = "irc.moonythm.dev";
2024-01-31 22:39:13 +01:00
bindHost = "irc.moonythm.dev";
2024-01-31 22:09:04 +01:00
certDir = "/var/lib/acme/wildcard-irc.moonythm.dev";
networks.tilde.config = config.sops.templates."pounce-tilde.cfg".path;
};
2024-01-31 21:59:11 +01:00
}