summaryrefslogtreecommitdiffstats
path: root/3modules/tv
diff options
context:
space:
mode:
Diffstat (limited to '3modules/tv')
-rw-r--r--3modules/tv/identity.nix25
1 files changed, 21 insertions, 4 deletions
diff --git a/3modules/tv/identity.nix b/3modules/tv/identity.nix
index c3c2f17bf..e0cd46c06 100644
--- a/3modules/tv/identity.nix
+++ b/3modules/tv/identity.nix
@@ -1,4 +1,4 @@
-{ lib, ... }:
+{ config, lib, ... }:
with lib;
let
@@ -6,7 +6,7 @@ let
out = {
options.tv.identity = api;
- #config = mkIf cfg.enable imp;
+ config = mkIf cfg.enable imp;
};
api = {
@@ -22,6 +22,8 @@ let
#dc = "cac";
dc = "tv";
fqdn = "cd.retiolum";
+ subdomains = [
+ ];
addr = "10.243.113.222";
#addr6 = "42:4522:25f8:36bb:8ccb:0150:231a:2af3";
#internet-addr = "162.219.5.183";
@@ -31,6 +33,8 @@ let
#dc = "cac";
dc = "tv";
fqdn = "mkdir.retiolum";
+ subdomains = [
+ ];
addr = "10.243.113.223";
cores = 1;
};
@@ -38,6 +42,8 @@ let
#dc = "gg";
dc = "tv";
fqdn = "nomic.retiolum";
+ subdomains = [
+ ];
addr = "10.243.0.110";
cores = 2;
};
@@ -45,6 +51,8 @@ let
#dc = "cac";
dc = "tv";
fqdn = "rmdir.retiolum";
+ subdomains = [
+ ];
addr = "10.243.113.224";
#addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af5";
cores = 1;
@@ -53,6 +61,8 @@ let
#dc = "gg";
dc = "tv";
fqdn = "wu.retiolum";
+ subdomains = [
+ ];
addr = "10.243.13.37";
cores = 8;
};
@@ -60,8 +70,15 @@ let
};
};
- #imp = {
- #};
+ imp = {
+ networking.extraHosts =
+ let
+ f = name: { addr, fqdn, subdomains, ... }: ''
+ ${addr} ${toString (map (s: "${s}.${name} ${s}.${fqdn}") subdomains)}
+ '';
+ in
+ concatStringsSep "\n" (mapAttrsToList f cfg.hosts);
+ };
in
out