2020-01-24 16:16:23 +00:00
|
|
|
# Variables referenced two or more places in the configuration.
|
|
|
|
let
|
|
|
|
server_ipv4 = "192.168.1.4";
|
2020-02-05 20:08:00 +00:00
|
|
|
server_ipv6 = "2600:6c4a:787f:d100:1e1b:dff:feea:830f";
|
2020-01-24 16:16:23 +00:00
|
|
|
|
2020-01-24 16:36:50 +00:00
|
|
|
# Configuration variables which are used to build out configs elsewhere.
|
2020-01-24 16:16:23 +00:00
|
|
|
in {
|
|
|
|
server_ipv4 = server_ipv4;
|
|
|
|
server_ipv6 = server_ipv6;
|
2020-01-04 22:16:31 +00:00
|
|
|
cfg = "/home/matt/cfg";
|
|
|
|
domain = "lan.servnerr.com";
|
|
|
|
hosts = {
|
2020-01-24 16:16:23 +00:00
|
|
|
# Machines that are remotely accessible and run services.
|
|
|
|
servers = [
|
|
|
|
{
|
|
|
|
name = "monitnerr-1";
|
|
|
|
ipv4 = "192.168.1.11";
|
|
|
|
ipv6 = {
|
|
|
|
gua = "2600:6c4a:787f:d100:dea6:32ff:fe1e:6694";
|
|
|
|
ula = "fd9e:1a04:f01d:0:dea6:32ff:fe1e:6694";
|
|
|
|
};
|
|
|
|
mac = "dc:a6:32:1e:66:94";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "nerr-3";
|
|
|
|
ipv4 = "192.168.1.9";
|
|
|
|
ipv6 = {
|
|
|
|
gua = "2600:6c4a:787f:d100:6d9:f5ff:fe7e:1c47";
|
|
|
|
ula = "fd9e:1a04:f01d:0:6d9:f5ff:fe7e:1c47";
|
|
|
|
};
|
|
|
|
mac = "04:d9:f5:7e:1c:47";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "servnerr-3";
|
|
|
|
ipv4 = server_ipv4;
|
|
|
|
ipv6 = {
|
|
|
|
gua = server_ipv6;
|
2020-02-05 20:08:00 +00:00
|
|
|
ula = "fd9e:1a04:f01d:0:1e1b:dff:feea:830f";
|
2020-01-24 16:16:23 +00:00
|
|
|
};
|
2020-02-05 20:08:00 +00:00
|
|
|
mac = "1c:1b:0d:ea:83:0f";
|
2020-01-24 16:16:23 +00:00
|
|
|
}
|
|
|
|
];
|
2020-01-24 16:36:50 +00:00
|
|
|
# Machines which are considered network infrastructure and not exposed
|
|
|
|
# externally.
|
|
|
|
infra = [
|
|
|
|
{
|
|
|
|
name = "switch-livingroom01";
|
|
|
|
ipv4 = "192.168.1.2";
|
|
|
|
ipv6.ula = "fd9e:1a04:f01d:0:f29f:c2ff:fe0b:28ca";
|
|
|
|
mac = "f0:9f:c2:0b:28:ca";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "switch-office01";
|
|
|
|
ipv4 = "192.168.1.3";
|
|
|
|
ipv6.ula = "fd9e:1a04:f01d:0:f29f:c2ff:fece:7ee1";
|
|
|
|
mac = "f0:9f:c2:ce:7e:e1";
|
|
|
|
}
|
|
|
|
{
|
2020-02-10 20:27:06 +00:00
|
|
|
name = "ap-livingroom02";
|
2020-01-24 16:36:50 +00:00
|
|
|
ipv4 = "192.168.1.5";
|
2020-02-10 20:27:06 +00:00
|
|
|
ipv6.ula = "fd9e:1a04:f01d::7683:c2ff:fe7a:c615";
|
|
|
|
mac = "74:83:c2:7a:c6:15";
|
2020-01-24 16:36:50 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "hdhomerun";
|
2020-02-06 17:34:06 +00:00
|
|
|
ipv4 = "192.168.66.10";
|
2020-01-24 16:36:50 +00:00
|
|
|
ipv6.ula = ""; # No IPv6 support unfortunately.
|
|
|
|
mac = "00:18:dd:32:52:c0";
|
|
|
|
}
|
|
|
|
];
|
2020-01-04 22:16:31 +00:00
|
|
|
};
|
|
|
|
interfaces = {
|
|
|
|
wan0 = {
|
|
|
|
name = "enp1s0";
|
|
|
|
ipv4 = "24.176.57.23";
|
|
|
|
};
|
|
|
|
lan0 = {
|
|
|
|
name = "enp2s0";
|
2020-01-23 21:39:38 +00:00
|
|
|
internal_domain = true;
|
2020-01-04 22:16:31 +00:00
|
|
|
ipv4 = "192.168.1.1";
|
|
|
|
ipv6 = {
|
|
|
|
lla = "fe80::20d:b9ff:fe53:eacd";
|
|
|
|
ula = "fd9e:1a04:f01d::1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
guest0 = {
|
|
|
|
name = "guest0";
|
2020-01-23 21:39:38 +00:00
|
|
|
internal_domain = false;
|
2020-01-04 22:16:31 +00:00
|
|
|
ipv4 = "192.168.9.1";
|
|
|
|
ipv6 = {
|
|
|
|
lla = "fe80::20d:b9ff:fe53:eacd";
|
|
|
|
ula = "fd9e:1a04:f01d:9::1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
iot0 = {
|
|
|
|
name = "iot0";
|
2020-01-23 21:39:38 +00:00
|
|
|
internal_domain = false;
|
2020-01-04 22:16:31 +00:00
|
|
|
ipv4 = "192.168.66.1";
|
|
|
|
ipv6 = {
|
|
|
|
lla = "fe80::20d:b9ff:fe53:eacd";
|
|
|
|
ula = "fd9e:1a04:f01d:66::1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lab0 = {
|
|
|
|
name = "lab0";
|
2020-01-23 21:39:38 +00:00
|
|
|
internal_domain = false;
|
2020-01-04 22:16:31 +00:00
|
|
|
ipv4 = "192.168.2.1";
|
|
|
|
ipv6 = {
|
|
|
|
lla = "fe80::20d:b9ff:fe53:eacd";
|
|
|
|
ula = "fd9e:1a04:f01d:2::1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
wg0 = {
|
|
|
|
name = "wg0";
|
|
|
|
ipv4 = "192.168.20.1";
|
|
|
|
ipv6 = {
|
|
|
|
# TODO try to get prefix delegation ordering working.
|
|
|
|
gua = "2600:6c4a:787f:d120::1";
|
|
|
|
lla = "fe80::";
|
|
|
|
ula = "fd9e:1a04:f01d:20::1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
localhost = {
|
|
|
|
ipv4 = "127.0.0.1";
|
|
|
|
ipv6 = "::1";
|
|
|
|
};
|
|
|
|
}
|