Seems to be almost working
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
./domains.nix
|
||||
./groups.nix
|
||||
./hosts.nix
|
||||
./networks.nix
|
||||
./sites.nix
|
||||
./users.nix
|
||||
./wireless-networks.nix
|
||||
|
||||
+102
-5
@@ -5,30 +5,112 @@
|
||||
atom = {
|
||||
description = "Niten's toy laptop.";
|
||||
enable-gui = false;
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
profile = "laptop";
|
||||
};
|
||||
|
||||
clunk = {
|
||||
description = "rus.selby.ca gateway box.";
|
||||
docker-server = true;
|
||||
ssh-fingerprints = [
|
||||
"1 1 0e23d2156b1f9fca8552a0105c125aed76e51728"
|
||||
"1 2 6d8dfc355102c9870945c6d79c1d19934d29e8b63303260101df51716963b7f5"
|
||||
"4 1 c31a6ecaa02210e3ad72a835a072a05f043c2ef4"
|
||||
"4 2 296ce1b91ac942a8b91e5c6316ea520d0cec14ac819a04bb262af6d4bdced696"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "rus.selby.ca";
|
||||
site = "russell";
|
||||
profile = "server";
|
||||
};
|
||||
|
||||
downstairs-desktop = {
|
||||
description = "Downstairs desktop in Russell.";
|
||||
ssh-fingerprints = [
|
||||
"1 1 ce704716ec0c3e330a243648531a10a2c78dd1ff"
|
||||
"1 2 6042bbc9b16122a4b63b1cfb84e179ae65911361e9d88ee3f0cd6659428ba27e"
|
||||
"3 1 de6dda3f72ee7043c804a7ad382033f3565b3b84"
|
||||
"3 2 cb611dd503fa15e913a101be15295f9084fa585b3225b6c1084521bff9b2140b"
|
||||
"4 1 a9a139b92851b3d9df2742a13bfea59c3e6e842e"
|
||||
"4 2 2260bfab177ab1ffb6a855b02b5a1aa719d765610e6a7bc79b09c340ce7c1236"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "rus.selby.ca";
|
||||
site = "russell";
|
||||
profile = "desktop";
|
||||
};
|
||||
|
||||
france = {
|
||||
description = "Primary fudo.org server.";
|
||||
docker-server = true;
|
||||
ssh-fingerprints = [
|
||||
"1 1 1b6d62dafae9ebc59169dfb4ef828582a5450d94"
|
||||
"1 2 079e7a57873542541095bf3d2f97b7350bb457d027b423a6fb56f7f6aa84ac80"
|
||||
"4 1 c95a198f504a589fc62893a95424b12f0b24732d"
|
||||
"4 2 3e7dad879d6cab7f7fb6769e156d7988d0c01281618d03b793834eea2f09bc96"
|
||||
];
|
||||
rp = "admin";
|
||||
admin-email = "admin@fudo.org";
|
||||
domain = "fudo.org";
|
||||
site = "portage";
|
||||
profile = "server";
|
||||
};
|
||||
|
||||
google-wifi = {
|
||||
description = "Google WiFi router.";
|
||||
rp = "niten";
|
||||
};
|
||||
|
||||
lambda = {
|
||||
description = "sea.fudo.org experiment server.";
|
||||
docker-server = true;
|
||||
ssh-fingerprints = [
|
||||
"1 1 128919958a358d44d1c8d76d29b1fa1514f9ad35"
|
||||
"1 2 cd0ae0bb7e65f4058efdb2d7073de97ac403b1ef6f1527a23c60390d9a6bad88"
|
||||
"4 1 a689caa9f1e75c6378efed592bc0d623e4b7d199"
|
||||
"4 2 5856ae661077203fba74a226dd77a17d69d6fda8ab960bfeb22a14c253f4472f"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
profile = "server";
|
||||
};
|
||||
|
||||
nostromo = {
|
||||
description = "sea.fudo.org gateway box and primary server.";
|
||||
docker-server = true;
|
||||
ssh-fingerprints = [
|
||||
"1 1 075ee0ae86debffa6fd61436984b39e4699c93c6"
|
||||
"1 2 17a555b21fe08841c8dfb0d598dc2da117b94bf5a94cbf2c6b391eafd3e2c15e"
|
||||
"4 1 ce86eabbe6f015e6422d0f5ef9ae32cc7beb1f42"
|
||||
"4 2 44a5741825d43e571f6f9eb91e8c102eea75a4632dd8a9c80668e091a5fdf7f5"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
profile = "server";
|
||||
};
|
||||
|
||||
plato = {
|
||||
description = "Niten's toy server.";
|
||||
ssh-fingerprints = [
|
||||
"4 1 9cc052ed00cbfd82c60530ebb3a35c25c0aeace9"
|
||||
"4 2 5938044054e9fa6cf3ad8176ef8e81b86eede598c19388220d4b07587f6f1c3c"
|
||||
"1 1 eebe1d4a24e0e2dbc46a7cb1107333c06e60d89e"
|
||||
"1 2 a96609da442372bd73044d823b4b56bbaa597725c846b4326be76c323bb47ab3"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "rus.selby.ca";
|
||||
site = "russell";
|
||||
profile = "server";
|
||||
};
|
||||
|
||||
procul = {
|
||||
@@ -36,12 +118,27 @@
|
||||
docker-server = true;
|
||||
};
|
||||
|
||||
spark = {
|
||||
description = "Niten's backup desktop.";
|
||||
pselby-work = { description = "Google Lenovo work laptop."; };
|
||||
|
||||
spark = { description = "Niten's backup desktop."; };
|
||||
|
||||
upstairs-desktop = {
|
||||
description = "Upstairs desktop in Russell.";
|
||||
ssh-fingerprints = [
|
||||
"1 1 f927527d712391b57aef6d2e7c3f225a86b62bf4"
|
||||
"1 2 17aece61156ba14c439aeae2e7b0f86daf97eea904241c35980f974ca1744c3d"
|
||||
"3 1 70f5f613e66e53a74534d33cd7ebf248cfdc3024"
|
||||
"3 2 774f1f00614751e51faa0add55183973893313d3a236d269adc3ab3c1f67c952"
|
||||
"4 1 e81e07d1ae7526c457a46ab1f18af3c016b4f48e"
|
||||
"4 2 e5af579cfb7f68b22492f5286b5249c5de74debf2a6cac78c070790f424566aa"
|
||||
];
|
||||
rp = "niten";
|
||||
admin-email = "niten@fudo.org";
|
||||
domain = "rus.selby.ca";
|
||||
site = "russell";
|
||||
profile = "desktop";
|
||||
};
|
||||
|
||||
zbox = {
|
||||
description = "Niten's primary desktop.";
|
||||
};
|
||||
zbox = { description = "Niten's primary desktop."; };
|
||||
};
|
||||
}
|
||||
|
||||
+7
-19
@@ -16,23 +16,22 @@ in {
|
||||
domain = config.fudo.domains.${domain-name};
|
||||
|
||||
in {
|
||||
# FIXME: think about this -- actual network config?
|
||||
enable = true;
|
||||
# NOTE: requests go:
|
||||
# - local bind instance
|
||||
# - pi-hole
|
||||
# - DoH resolver
|
||||
domain = domain-name;
|
||||
dns-servers = [ primary-ip ];
|
||||
gateway = primary-ip;
|
||||
dhcp-interfaces = [ "intif0" ];
|
||||
dns-serve-ips = [ primary-ip "127.0.0.1" "127.0.1.1" "::1" ];
|
||||
dns-listen-ips = [ primary-ip "127.0.0.1" "127.0.1.1" "::1" ];
|
||||
recursive-resolver = "${primary-ip} port 5353";
|
||||
server-ip = primary-ip;
|
||||
domain = "rus.selby.ca";
|
||||
network = site.network;
|
||||
dhcp-dynamic-network = site.dynamic-network;
|
||||
hosts = domain.hosts;
|
||||
|
||||
search-domains = [ domain-name "selby.ca" ];
|
||||
enable-reverse-mappings = true;
|
||||
network-definition = config.fudo.networks."rus.selby.ca";
|
||||
};
|
||||
|
||||
networking = {
|
||||
@@ -43,12 +42,11 @@ in {
|
||||
};
|
||||
|
||||
interfaces = {
|
||||
enp1s0.useDHCP = false;
|
||||
enp2s0.useDHCP = false;
|
||||
enp3s0.useDHCP = false;
|
||||
enp4s0.useDHCP = false;
|
||||
|
||||
enp1s0.useDHCP = true;
|
||||
|
||||
intif0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
@@ -132,17 +130,7 @@ in {
|
||||
"hole"
|
||||
];
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3080";
|
||||
|
||||
# extraConfig = ''
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-By $server_addr:$server_port;
|
||||
# proxy_set_header X-Forwarded-For $remote_addr;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# '';
|
||||
};
|
||||
locations."/" = { proxyPass = "http://127.0.0.1:3080"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config.fudo.networks = {
|
||||
"rus.selby.ca" = import ./networks/rus.selby.ca.nix { inherit config lib; };
|
||||
"sea.fudo.org" = import ./networks/rus.selby.ca.nix { inherit config lib; };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
mx = [ "mail.fudo.org" ];
|
||||
|
||||
default-host = "208.81.3.117";
|
||||
|
||||
aliases = {
|
||||
pop = "mail.fudo.org.";
|
||||
smtp = "mail.fudo.org.";
|
||||
imap = "mail.fudo.org.";
|
||||
webmail = "france.fudo.org.";
|
||||
|
||||
archiva = "france.fudo.org.";
|
||||
auth = "france.fudo.org.";
|
||||
backplane = "france.fudo.org.";
|
||||
chat = "france.fudo.org.";
|
||||
de = "germany.fudo.org.";
|
||||
fr = "france.fudo.org.";
|
||||
git = "france.fudo.org.";
|
||||
metrics = "france.fudo.org.";
|
||||
minecraft = "france.fudo.org.";
|
||||
monitor = "france.fudo.org.";
|
||||
user = "paris.fudo.org.";
|
||||
u = "user.fudo.org.";
|
||||
w = "www.fudo.org.";
|
||||
ww = "www.fudo.org.";
|
||||
www = "hanover.fudo.org.";
|
||||
wiki = "hanover.fudo.org.";
|
||||
};
|
||||
|
||||
extra-dns-records = [
|
||||
''@ IN TXT "v=spf1 mx ip4:208.81.3.112/28 ip6:2605:e200:d200::1/48 -all"''
|
||||
''@ IN SPF "v=spf1 mx ip4:208.81.3.112/28 ip6:2605:e200:d200::1/48 -all"''
|
||||
];
|
||||
|
||||
dmarc-report-address = "dmarc-report@fudo.org";
|
||||
|
||||
srv-records = {
|
||||
tcp = {
|
||||
domain = [
|
||||
{
|
||||
host = "ns1.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns2.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns3.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns4.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
];
|
||||
ssh = [{
|
||||
host = "france.fudo.org";
|
||||
port = 22;
|
||||
}];
|
||||
smtp = [{
|
||||
host = "mail.fudo.org";
|
||||
port = 25;
|
||||
}];
|
||||
submission = [{
|
||||
host = "mail.fudo.org";
|
||||
port = 587;
|
||||
}];
|
||||
kerberos = [{
|
||||
host = "france.fudo.org";
|
||||
port = 88;
|
||||
}];
|
||||
imaps = [{
|
||||
host = "mail.fudo.org";
|
||||
port = 993;
|
||||
}];
|
||||
ldap = [{
|
||||
host = "france.fudo.org";
|
||||
port = 389;
|
||||
}];
|
||||
ldaps = [{
|
||||
host = "france.fudo.org";
|
||||
port = 636;
|
||||
}];
|
||||
pop3s = [{
|
||||
host = "mail.fudo.org";
|
||||
port = 995;
|
||||
}];
|
||||
http = [{
|
||||
host = "wiki.fudo.org";
|
||||
port = 80;
|
||||
}];
|
||||
https = [{
|
||||
host = "wiki.fudo.org";
|
||||
port = 80;
|
||||
}];
|
||||
xmpp-server = [{
|
||||
host = "fudo.im";
|
||||
port = 5269;
|
||||
}];
|
||||
xmpp-client = [{
|
||||
host = "fudo.im";
|
||||
port = 5222;
|
||||
}];
|
||||
};
|
||||
udp = {
|
||||
domain = [
|
||||
{
|
||||
host = "ns1.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns2.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns3.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
{
|
||||
host = "ns4.fudo.org";
|
||||
port = 53;
|
||||
}
|
||||
];
|
||||
kerberos = [{
|
||||
host = "france.fudo.org";
|
||||
port = 88;
|
||||
}];
|
||||
kerberos-master = [{
|
||||
host = "france.fudo.org";
|
||||
port = 88;
|
||||
}];
|
||||
kpasswd = [{
|
||||
host = "france.fudo.org";
|
||||
port = 464;
|
||||
}];
|
||||
xmpp-server = [{
|
||||
host = "fudo.im";
|
||||
port = 5269;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
hosts = {
|
||||
cisco = { ipv4-address = "198.163.150.211"; };
|
||||
cisco-int = { ipv4-address = "10.73.77.10"; };
|
||||
cupid = { ipv4-address = "208.38.36.100"; };
|
||||
docker = { ipv4-address = "208.81.3.126"; };
|
||||
france = { ipv4-address = "208.81.3.117"; };
|
||||
frankfurt = {
|
||||
ipv4-address = "208.81.3.120";
|
||||
ipv6-address = "2605:e200:d200:1:5054:ff:fe8c:9738";
|
||||
};
|
||||
germany = {
|
||||
ipv4-address = "208.81.3.116";
|
||||
ipv6-address = "2605:e200:d200:1:78d9:d8ff:fe0f:dd88";
|
||||
};
|
||||
hanover = {
|
||||
ipv4-address = "208.81.1.130";
|
||||
ipv6-address = "2605:e200:d100:1:5054:ff:fe61:ac8b";
|
||||
};
|
||||
localhost = { ipv4-address = "127.0.0.1"; };
|
||||
lsbb-gba = { ipv4-address = "199.101.56.34"; };
|
||||
lsbb-abg = { ipv4-address = "199.101.56.38"; };
|
||||
lsbb-hwd = { ipv4-address = "199.101.56.106"; };
|
||||
lsbb-hcl = { ipv4-address = "199.101.56.110"; };
|
||||
procul = { ipv4-address = "172.86.179.18"; };
|
||||
prunel = { ipv4-address = "208.81.3.123"; };
|
||||
mbix = { ipv4-address = "208.81.7.146"; };
|
||||
ns3-fudo = { ipv4-address = "208.75.74.205"; };
|
||||
ns3-dair = { ipv4-address = "208.75.74.205"; };
|
||||
ns4-fudo = { ipv4-address = "208.75.75.157"; };
|
||||
ns4-dair = { ipv4-address = "208.75.75.157"; };
|
||||
paris = {
|
||||
ipv4-address = "208.81.3.125";
|
||||
ipv6-address = "2605:e200:d200:1:5054:ff:fe67:d0c1";
|
||||
};
|
||||
probe = { ipv4-address = "208.81.3.119"; };
|
||||
tours = {
|
||||
ipv4-address = "208.81.3.121";
|
||||
ipv6-address = "2605:e200:d200:1:5054:ff:fe95:34e5";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,52 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let local-domain = "rus.selby.ca";
|
||||
|
||||
in {
|
||||
domain = "${local-domain}";
|
||||
default-host = "10.0.0.1";
|
||||
|
||||
network = "10.0.0.0/16";
|
||||
mx = [ "mail.fudo.org" ];
|
||||
|
||||
dhcp-dynamic-network = "10.0.1.0/24";
|
||||
gssapi-realm = "FUDO.ORG";
|
||||
|
||||
enable-reverse-mappings = true;
|
||||
hosts = {
|
||||
clunk = {
|
||||
ipv4-address = "10.0.0.1";
|
||||
mac-address = "02:44:d1:eb:c3:6b";
|
||||
};
|
||||
|
||||
dns-proxy = {
|
||||
ipv4-address = "10.0.0.2";
|
||||
# This is just an alias for clunk's primary interface
|
||||
};
|
||||
|
||||
google-wifi = {
|
||||
ipv4-address = "10.0.0.11";
|
||||
mac-address = "70:3a:cb:c0:3b:09";
|
||||
};
|
||||
|
||||
pselby-work = {
|
||||
ipv4-address = "10.0.0.151";
|
||||
mac-address = "00:50:b6:aa:bd:b3";
|
||||
};
|
||||
|
||||
downstairs-desktop = {
|
||||
ipv4-address = "10.0.0.100";
|
||||
mac-address = "90:b1:1c:8e:29:cf";
|
||||
};
|
||||
|
||||
upstairs-desktop = {
|
||||
ipv4-address = "10.0.0.101";
|
||||
mac-address = "80:e8:2c:22:65:c2";
|
||||
};
|
||||
};
|
||||
|
||||
aliases = {
|
||||
dns-hole = "clunk";
|
||||
gateway = "clunk";
|
||||
upstairs = "upstairs-desktop";
|
||||
downstairs = "downstairs-desktop";
|
||||
};
|
||||
|
||||
srv-records = {
|
||||
tcp = {
|
||||
@@ -47,38 +87,4 @@ in {
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
aliases = { dns-hole = "clunk"; };
|
||||
|
||||
hosts = {
|
||||
clunk = {
|
||||
ip-address = "10.0.0.1";
|
||||
mac-address = "02:44:d1:eb:c3:6b";
|
||||
};
|
||||
|
||||
dns-proxy = {
|
||||
ip-address = "10.0.0.2";
|
||||
# This is just an alias for clunk's primary interface
|
||||
};
|
||||
|
||||
google-wifi = {
|
||||
ip-address = "10.0.0.11";
|
||||
mac-address = "70:3a:cb:c0:3b:09";
|
||||
};
|
||||
|
||||
pselby-work = {
|
||||
ip-address = "10.0.0.151";
|
||||
mac-address = "00:50:b6:aa:bd:b3";
|
||||
};
|
||||
|
||||
downstairs-desktop = {
|
||||
ip-address = "10.0.0.100";
|
||||
mac-address = "90:b1:1c:8e:29:cf";
|
||||
};
|
||||
|
||||
upstairs-desktop = {
|
||||
ip-address = "10.0.0.101";
|
||||
mac-address = "80:e8:2c:22:65:c2";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -48,7 +48,7 @@ in {
|
||||
emacs-nox
|
||||
ldns
|
||||
ldns.examples
|
||||
jdk14_headless
|
||||
jdk12_headless
|
||||
racket-minimal
|
||||
reboot-if-necessary
|
||||
test-config
|
||||
|
||||
Reference in New Issue
Block a user