From 1e0d7813dde1f39e6a8fa2e61442e9fc422c85dd Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 18 Jan 2026 23:07:43 +0100 Subject: [PATCH] Add a sample of real PVV data --- hosts.nix | 81 +++++++++++++++++++++++++++---------------- zones/pvv.ntnu.no.nix | 38 ++++++++++++++++++-- 2 files changed, 86 insertions(+), 33 deletions(-) diff --git a/hosts.nix b/hosts.nix index 95c026d..0ff4f44 100644 --- a/hosts.nix +++ b/hosts.nix @@ -10,6 +10,34 @@ in # - 210.241.129.in-addr.arpa. (reverse-ipv4, where applicable) # - 9.1.0.0.3.0.0.0.7.0.1.0.0.2.ip6.arpa. (reverse-ipv6, where applicable) + # Servere + bekkalokk = { + ipv4 = pvvv4 168; + ipv6 = pvvv6 168; + + aliases = [ + "idp" + "idp2" + "pw" + "webmail" + "wiki" + "www" + "www2" + ]; + }; + + innovation = { + ipv4 = pvvv4 214; + ipv6 = pvvv6 "1:56"; # TODO - Change + }; + + drolsum = { + ipv4 = pvvv4 217; + ipv6 = pvvv6 217; + # hinfo = ["Login-boks" "Debian-konteiner"]; + aliases = [ "login2" ]; + }; + # Terminaler demiurgen = { ipv4 = pvvv4 201; @@ -18,39 +46,32 @@ in aliases = [ "rurgen" ]; }; - # Andre servere - drolsum = { - ipv4 = pvvv4 217; - ipv6 = pvvv6 217; - # hinfo = ["Login-boks" "Debian-konteiner"]; - aliases = [ "login2" ]; - }; # PVV-DNS code stress-testing: - utenipv4 = { - ipv6 = [ - (pvvv6 1337) - (pvvv6 "cafe:babe") - ]; - }; + # utenipv4 = { + # ipv6 = [ + # (pvvv6 1337) + # (pvvv6 "cafe:babe") + # ]; + # }; - utenipv6 = { - ipv4 = pvvv4 137; - }; + # utenipv6 = { + # ipv4 = pvvv4 137; + # }; - roundrobin = { - ipv4 = [ - (pvvv4 201) - (pvvv4 202) - ]; - ipv6 = [ - (pvvv6 201) - (pvvv6 202) - ]; - }; + # roundrobin = { + # ipv4 = [ + # (pvvv4 201) + # (pvvv4 202) + # ]; + # ipv6 = [ + # (pvvv6 201) + # (pvvv6 202) + # ]; + # }; - ildkule = { - ipv4 = "129.241.153.213"; - ipv6 = "2001:700:300:6026:f816:3eff:fe58:f1e8"; - }; + # ildkule = { + # ipv4 = "129.241.153.213"; + # ipv6 = "2001:700:300:6026:f816:3eff:fe58:f1e8"; + # }; } diff --git a/zones/pvv.ntnu.no.nix b/zones/pvv.ntnu.no.nix index c8f1319..ba7adf8 100644 --- a/zones/pvv.ntnu.no.nix +++ b/zones/pvv.ntnu.no.nix @@ -17,10 +17,42 @@ in "nn.unintett.no" ]; - CNAME = [ "www.pvv.ntnu.no" ]; + SRV = [ + # TODO: Find out if this is a bug in dns.nix + # I would think this should be + # _minecraft._tcp IN SRV 0 1 25565 innovation + # but actually becomes + # @ IN SRV 0 100 25565 innovation + # with no mention of "minecraft" or "tcp" + { + service = "minecraft"; + proto = "tcp"; + port = 25565; + target = "innovation"; + } + ]; subdomains = pvvHostRecords // { - # Override with custom / additional subdomains - "_dmarc".TXT = [ "v=DMARC1; p=quarantine; fo=1;" ]; # TODO: Better example, as dns.nix has the DMARC type + stackit.NS = [ "ns1.stack.it.ntnu.no" "ns2.stack.it.ntnu.no" ]; + + "@" = { + TXT = [ + "v=spf1 mx ~all" + ]; + + A = pvvHostRecords.bekkalokk.A; + AAAA = pvvHostRecords.bekkalokk.AAAA; + }; + + _dmarc.TXT = [ "v=DMARC1; p=quarantine; fo=1;" ]; + + minecraft.SRV = [ + { + service = "minecraft"; + proto = "tcp"; + port = 25565; + target = "innovation"; + } + ]; }; }