2020-01-24 16:16:23 +00:00
|
|
|
# Variables referenced two or more places in the configuration.
|
|
|
|
let
|
2020-04-28 18:08:59 +00:00
|
|
|
# TODO: remove and pull from generated data.
|
2020-01-24 16:16:23 +00:00
|
|
|
server_ipv4 = "192.168.1.4";
|
2020-04-28 02:10:33 +00:00
|
|
|
server_ipv6 = "2600:6c4a:7880:3200:1e1b:dff:feea:830f";
|
2020-01-24 16:16:23 +00:00
|
|
|
|
2020-04-28 18:08:59 +00:00
|
|
|
# Import computed host/interface data from vars.json.
|
2020-04-28 18:12:30 +00:00
|
|
|
gen = builtins.fromJSON (builtins.readFile ./vars.json);
|
2020-04-28 18:08:59 +00:00
|
|
|
hosts = gen.hosts;
|
|
|
|
interfaces = gen.interfaces;
|
2020-01-24 16:16:23 +00:00
|
|
|
in {
|
2020-04-27 18:27:17 +00:00
|
|
|
inherit server_ipv4;
|
|
|
|
inherit server_ipv6;
|
2020-04-28 18:08:59 +00:00
|
|
|
inherit hosts;
|
|
|
|
inherit interfaces;
|
2020-04-27 18:27:17 +00:00
|
|
|
|
2020-01-04 22:16:31 +00:00
|
|
|
domain = "lan.servnerr.com";
|
|
|
|
localhost = {
|
|
|
|
ipv4 = "127.0.0.1";
|
|
|
|
ipv6 = "::1";
|
|
|
|
};
|
|
|
|
}
|