2023-08-31 00:55:45 +02:00
|
|
|
{ config, depot, lib, ... }:
|
2022-09-18 22:13:06 +02:00
|
|
|
|
2022-10-22 14:12:37 +02:00
|
|
|
let
|
2023-08-31 00:55:45 +02:00
|
|
|
inherit (depot) hours;
|
2023-06-02 21:13:20 +02:00
|
|
|
|
2023-08-31 00:55:45 +02:00
|
|
|
inherit (depot.lib.meta) domain;
|
2023-06-02 21:13:20 +02:00
|
|
|
|
2022-10-22 14:12:37 +02:00
|
|
|
subDomains = {
|
|
|
|
VEGAS = "eu1";
|
|
|
|
prophet = "eu2";
|
|
|
|
};
|
|
|
|
in
|
2022-09-18 22:13:06 +02:00
|
|
|
{
|
|
|
|
vars = {
|
2022-10-22 14:13:59 +02:00
|
|
|
ircOpers = [ "max" "num" "ark" ];
|
2022-09-18 22:13:06 +02:00
|
|
|
};
|
2022-10-22 14:12:37 +02:00
|
|
|
hostLinks = lib.genAttrs config.services.irc.nodes.host (name: {
|
|
|
|
irc = {
|
2023-06-02 21:13:20 +02:00
|
|
|
hostname = "${subDomains.${name}}.irc.${domain}";
|
|
|
|
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
2022-10-22 14:12:37 +02:00
|
|
|
inherit (config.links.irc) port;
|
|
|
|
};
|
|
|
|
ircSecure = {
|
2023-06-02 21:13:20 +02:00
|
|
|
hostname = "${subDomains.${name}}.irc.${domain}";
|
|
|
|
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
2022-10-22 14:12:37 +02:00
|
|
|
inherit (config.links.ircSecure) port;
|
|
|
|
};
|
|
|
|
});
|
2022-09-18 22:13:06 +02:00
|
|
|
links = {
|
|
|
|
irc = {
|
2022-10-22 14:12:37 +02:00
|
|
|
ipv4 = "irc.${domain}";
|
2022-09-18 22:13:06 +02:00
|
|
|
port = 6667;
|
|
|
|
};
|
|
|
|
ircSecure = {
|
2022-10-22 14:12:37 +02:00
|
|
|
ipv4 = "irc.${domain}";
|
2022-09-18 22:13:06 +02:00
|
|
|
port = 6697;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.irc = {
|
|
|
|
nodes = {
|
|
|
|
host = [ "VEGAS" "prophet" ];
|
|
|
|
};
|
|
|
|
nixos = {
|
|
|
|
host = [
|
|
|
|
./irc-host.nix
|
|
|
|
];
|
|
|
|
};
|
2024-07-08 18:53:06 +02:00
|
|
|
secrets.peerKey = {
|
|
|
|
nodes = config.services.irc.nodes.host;
|
|
|
|
owner = "ngircd";
|
|
|
|
services = [ "ngircd" ];
|
|
|
|
};
|
2022-09-18 22:13:06 +02:00
|
|
|
};
|
2023-06-05 00:02:37 +02:00
|
|
|
|
|
|
|
monitoring.blackbox.targets = {
|
|
|
|
irc = {
|
2023-06-05 00:17:46 +02:00
|
|
|
address = config.links.ircSecure.tuple;
|
2023-06-05 00:02:37 +02:00
|
|
|
module = "ircsConnect";
|
|
|
|
};
|
|
|
|
};
|
2023-11-02 23:45:34 +01:00
|
|
|
|
|
|
|
dns.records.irc.consulService = "irc";
|
2022-09-18 22:13:06 +02:00
|
|
|
}
|