2023-06-02 22:13:20 +03:00
|
|
|
{ config, depot, lib, tools, ... }:
|
2022-09-18 23:13:06 +03:00
|
|
|
|
2022-10-22 15:12:37 +03:00
|
|
|
let
|
2023-06-02 22:13:20 +03:00
|
|
|
inherit (depot.config) hours;
|
|
|
|
|
2022-10-22 15:12:37 +03:00
|
|
|
inherit (tools.meta) domain;
|
2023-06-02 22:13:20 +03:00
|
|
|
|
2022-10-22 15:12:37 +03:00
|
|
|
subDomains = {
|
|
|
|
VEGAS = "eu1";
|
|
|
|
prophet = "eu2";
|
|
|
|
};
|
|
|
|
in
|
2022-09-18 23:13:06 +03:00
|
|
|
{
|
|
|
|
vars = {
|
|
|
|
ircPeerKey = {
|
|
|
|
file = ./irc-peer-key.age;
|
|
|
|
owner = "ngircd";
|
|
|
|
group = "ngircd";
|
|
|
|
};
|
2022-10-22 15:13:59 +03:00
|
|
|
ircOpers = [ "max" "num" "ark" ];
|
2022-09-18 23:13:06 +03:00
|
|
|
};
|
2022-10-22 15:12:37 +03:00
|
|
|
hostLinks = lib.genAttrs config.services.irc.nodes.host (name: {
|
|
|
|
irc = {
|
2023-06-02 22:13:20 +03:00
|
|
|
hostname = "${subDomains.${name}}.irc.${domain}";
|
|
|
|
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
2022-10-22 15:12:37 +03:00
|
|
|
inherit (config.links.irc) port;
|
|
|
|
};
|
|
|
|
ircSecure = {
|
2023-06-02 22:13:20 +03:00
|
|
|
hostname = "${subDomains.${name}}.irc.${domain}";
|
|
|
|
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
2022-10-22 15:12:37 +03:00
|
|
|
inherit (config.links.ircSecure) port;
|
|
|
|
};
|
|
|
|
});
|
2022-09-18 23:13:06 +03:00
|
|
|
links = {
|
|
|
|
irc = {
|
2022-10-22 15:12:37 +03:00
|
|
|
ipv4 = "irc.${domain}";
|
2022-09-18 23:13:06 +03:00
|
|
|
port = 6667;
|
|
|
|
};
|
|
|
|
ircSecure = {
|
2022-10-22 15:12:37 +03:00
|
|
|
ipv4 = "irc.${domain}";
|
2022-09-18 23:13:06 +03:00
|
|
|
port = 6697;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.irc = {
|
|
|
|
nodes = {
|
|
|
|
host = [ "VEGAS" "prophet" ];
|
|
|
|
};
|
|
|
|
nixos = {
|
|
|
|
host = [
|
|
|
|
./irc-host.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-06-05 01:02:37 +03:00
|
|
|
|
|
|
|
monitoring.blackbox.targets = {
|
|
|
|
irc = {
|
2023-06-05 01:17:46 +03:00
|
|
|
address = config.links.ircSecure.tuple;
|
2023-06-05 01:02:37 +03:00
|
|
|
module = "ircsConnect";
|
|
|
|
};
|
|
|
|
};
|
2022-09-18 23:13:06 +03:00
|
|
|
}
|