cluster/services/irc: no DNS indirection
This commit is contained in:
parent
d308f80ab5
commit
70f67f6e71
2 changed files with 11 additions and 6 deletions
|
@ -1,7 +1,10 @@
|
|||
{ config, lib, tools, ... }:
|
||||
{ config, depot, lib, tools, ... }:
|
||||
|
||||
let
|
||||
inherit (depot.config) hours;
|
||||
|
||||
inherit (tools.meta) domain;
|
||||
|
||||
subDomains = {
|
||||
VEGAS = "eu1";
|
||||
prophet = "eu2";
|
||||
|
@ -18,11 +21,13 @@ in
|
|||
};
|
||||
hostLinks = lib.genAttrs config.services.irc.nodes.host (name: {
|
||||
irc = {
|
||||
ipv4 = "${subDomains.${name}}.irc.${domain}";
|
||||
hostname = "${subDomains.${name}}.irc.${domain}";
|
||||
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
||||
inherit (config.links.irc) port;
|
||||
};
|
||||
ircSecure = {
|
||||
ipv4 = "${subDomains.${name}}.irc.${domain}";
|
||||
hostname = "${subDomains.${name}}.irc.${domain}";
|
||||
ipv4 = hours.${name}.interfaces.primary.addrPublic;
|
||||
inherit (config.links.ircSecure) port;
|
||||
};
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ let
|
|||
peerLink = cluster.config.hostLinks.${name}.ircSecure;
|
||||
in ''
|
||||
[Server]
|
||||
Name = ${peerLink.ipv4}
|
||||
Name = ${peerLink.hostname}
|
||||
Host = ${peerLink.ipv4}
|
||||
Port = ${peerLink.portStr}
|
||||
MyPassword = @PEER_PASSWORD@
|
||||
|
@ -32,7 +32,7 @@ let
|
|||
Mask = *!${name}@*
|
||||
'';
|
||||
|
||||
serverName = linkSecure.ipv4;
|
||||
serverName = linkSecure.hostname;
|
||||
cert = config.security.acme.certs."${serverName}";
|
||||
dh = config.security.dhparams.params.ngircd;
|
||||
in {
|
||||
|
@ -114,7 +114,7 @@ in {
|
|||
port = linkSecure.port;
|
||||
checks = lib.singleton {
|
||||
interval = "60s";
|
||||
tcp = link.tuple;
|
||||
tcp = "${linkSecure.ipv4}:${linkSecure.portStr}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue