summaryrefslogtreecommitdiffstats
path: root/2configs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-07-23 00:37:21 +0200
committertv <tv@shackspace.de>2015-07-23 00:37:21 +0200
commit504b1b90e809934a01357450ccdf35c4e4afc74d (patch)
tree2b6a539ad2a9f3c4d4b2cf24034cea7e239acb51 /2configs
parent14ac6d3bba12f07bd8aa79221b9c64469fe03046 (diff)
* tv identity: define type harder
Diffstat (limited to '2configs')
-rw-r--r--2configs/tv/charybdis.nix16
-rw-r--r--2configs/tv/identity.nix91
2 files changed, 98 insertions, 9 deletions
diff --git a/2configs/tv/charybdis.nix b/2configs/tv/charybdis.nix
index 014844e8..a45c7aeb 100644
--- a/2configs/tv/charybdis.nix
+++ b/2configs/tv/charybdis.nix
@@ -123,7 +123,7 @@ let
#loadmodule "extensions/ip_cloaking.so";
serverinfo {
- name = ${toJSON config.tv.identity.self.fqdn};
+ name = ${toJSON (head config.tv.identity.self.nets.retiolum.aliases)};
sid = "4z3";
description = "miep!";
network_name = "irc.retiolum";
@@ -133,9 +133,9 @@ let
/* On multi-homed hosts you may need the following. These define
* the addresses we connect from to other servers. */
/* for IPv4 */
- vhost = ${toJSON config.tv.identity.self.addr};
+ vhost = ${concatMapStringsSep ", " toJSON config.tv.identity.self.nets.retiolum.addrs4};
/* for IPv6 */
- vhost6 = ${toJSON config.tv.identity.self.addr6};
+ vhost6 = ${concatMapStringsSep ", " toJSON config.tv.identity.self.nets.retiolum.addrs6};
/* ssl_private_key: our ssl private key */
ssl_private_key = "/tmp/ssl.key";
@@ -238,12 +238,10 @@ let
/* If you want to listen on a specific IP only, specify host.
* host definitions apply only to the following port line.
*/
- host = ${toJSON config.tv.identity.self.addr};
- port = 6667;
- sslport = 6697;
-
- /* Listen on IPv6 (if you used host= above). */
- host = ${toJSON config.tv.identity.self.addr6};
+ # XXX This is stupid because only one host is allowed[?]
+ #host = ''${concatMapStringsSep ", " toJSON (
+ # config.tv.identity.self.nets.retiolum.addrs
+ #)};
port = 6667;
sslport = 6697;
};
diff --git a/2configs/tv/identity.nix b/2configs/tv/identity.nix
new file mode 100644
index 00000000..312c59d8
--- /dev/null
+++ b/2configs/tv/identity.nix
@@ -0,0 +1,91 @@
+{ config, ... }:
+
+{
+ imports = [ ../../3modules/tv/identity.nix ];
+ tv.identity = {
+ enable = true;
+ hosts = {
+ cd = {
+ cores = 2;
+ dc = "tv"; #dc = "cac";
+ nets = {
+ internet = {
+ addrs4 = ["162.219.7.216"];
+ aliases = [
+ "cd.internet"
+ "cd.viljetic.de"
+ "cgit.cd.viljetic.de"
+ "cd.krebsco.de"
+ ];
+ };
+ retiolum = {
+ addrs4 = ["10.243.113.222"];
+ addrs6 = ["42:4522:25f8:36bb:8ccb:0150:231a:2af3"];
+ aliases = [
+ "cd.retiolum"
+ "cgit.cd.retiolum"
+ ];
+ };
+ };
+ search = "retiolum";
+ };
+ mkdir = {
+ cores = 1;
+ dc = "tv"; #dc = "cac";
+ nets = {
+ retiolum = {
+ addrs4 = ["10.243.113.223"];
+ aliases = [
+ "mkdir.retiolum"
+ "cgit.mkdir.retiolum"
+ ];
+ };
+ };
+ search = "retiolum";
+ };
+ nomic = {
+ cores = 2;
+ dc = "tv"; #dc = "gg23";
+ nets = {
+ retiolum = {
+ addrs4 = ["10.243.0.110"];
+ aliases = [
+ "nomic.retiolum"
+ "cgit.nomic.retiolum"
+ ];
+ };
+ };
+ search = "retiolum";
+ };
+ rmdir = {
+ cores = 1;
+ dc = "tv"; #dc = "cac";
+ nets = {
+ retiolum = {
+ addrs4 = ["10.243.113.224"];
+ addrs6 = ["42:4522:25f8:36bb:8ccb:0150:231a:2af5"];
+ aliases = [
+ "rmdir.retiolum"
+ "cgit.rmdir.retiolum"
+ ];
+ };
+ };
+ search = "retiolum";
+ };
+ wu = {
+ cores = 4;
+ # TODO wu is mobile, so dc means "home data center"
+ dc = "tv"; #dc = "gg23";
+ nets = {
+ retiolum = {
+ addrs4 = ["10.243.13.37"];
+ aliases = [
+ "wu.retiolum"
+ ];
+ };
+ };
+ search = "retiolum";
+ };
+ };
+ };
+}