depot/cluster/services/irc/default.nix

49 lines
870 B
Nix
Raw Normal View History

{ config, lib, tools, ... }:
2022-09-18 23:13:06 +03:00
let
inherit (tools.meta) domain;
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";
};
};
hostLinks = lib.genAttrs config.services.irc.nodes.host (name: {
irc = {
ipv4 = "${subDomains.${name}}.irc.${domain}";
inherit (config.links.irc) port;
};
ircSecure = {
ipv4 = "${subDomains.${name}}.irc.${domain}";
inherit (config.links.ircSecure) port;
};
});
2022-09-18 23:13:06 +03:00
links = {
irc = {
ipv4 = "irc.${domain}";
2022-09-18 23:13:06 +03:00
port = 6667;
};
ircSecure = {
ipv4 = "irc.${domain}";
2022-09-18 23:13:06 +03:00
port = 6697;
};
};
services.irc = {
nodes = {
host = [ "VEGAS" "prophet" ];
};
nixos = {
host = [
./irc-host.nix
];
};
};
}