Fix SRV records

This commit is contained in:
2026-01-20 22:46:46 +01:00
parent 5a49b9284c
commit 6ef9eaa00d
3 changed files with 25 additions and 30 deletions

10
flake.lock generated
View File

@@ -8,15 +8,15 @@
]
},
"locked": {
"lastModified": 1768143854,
"narHash": "sha256-E5/kyPz4zAZn/lZdvqlF83jMgCWNxmqYjjWuadngCbk=",
"owner": "nix-community",
"lastModified": 1768939908,
"narHash": "sha256-sD4UyILWAhk7aexE3YpDOdb71ZEeL+1/+LV05XIWCBo=",
"owner": "felixalbrigtsen",
"repo": "dns.nix",
"rev": "a97cf4156e9f044fe4bed5be531061000dfabb07",
"rev": "f5a60ede524ee641256f878b1f28d4151577a727",
"type": "github"
},
"original": {
"owner": "nix-community",
"owner": "felixalbrigtsen",
"repo": "dns.nix",
"type": "github"
}

View File

@@ -3,7 +3,10 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
dns.url = "github:nix-community/dns.nix";
# Broken, wait for https://github.com/nix-community/dns.nix/pull/52
#dns.url = "github:nix-community/dns.nix";
dns.url = "github:felixalbrigtsen/dns.nix";
dns.inputs.nixpkgs.follows = "nixpkgs";
};

View File

@@ -25,30 +25,22 @@ in
}
];
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
# (as specified in https://github.com/nix-community/dns.nix/blob/a97cf4156e9f044fe4bed5be531061000dfabb07/dns/types/records/SRV.nix#L55), but actually becomes
# @ IN SRV 0 100 25565 innovation
# with no mention of "minecraft" or "tcp"
{
service = "minecraft";
proto = "tcp";
port = 25565;
target = "innovation";
priority = 0;
weight = 1;
}
# TODO:
# _minecraft._tcp 3600 IN SRV 0 1 25565 innovation
# _kerberos._udp IN SRV 0 0 88 balduzius.pvv.ntnu.no.
# _kerberos._tcp IN SRV 0 0 88 balduzius.pvv.ntnu.no.
# _kpasswd._udp IN SRV 0 0 464 balduzius.pvv.ntnu.no.
# _kerberos-adm._udp IN SRV 0 0 749 balduzius.pvv.ntnu.no.
# _kerberos-adm._tcp IN SRV 0 0 749 balduzius.pvv.ntnu.no.
# _http._tcp IN SRV 10 10 80 bekkalokk.pvv.ntnu.no.
# _https._tcp IN SRV 10 10 443 bekkalokk.pvv.ntnu.no.
# TODO - Re-add priority/weight?
SRV = let
tcp = "tcp";
udp = "udp";
mkSrv = service: proto: port: target: {
inherit service proto port target;
};
in [
(mkSrv "minecraft" tcp 25565 "innovation")
(mkSrv "kerberos" tcp 88 "balduzius")
(mkSrv "kerberos" udp 88 "balduzius")
(mkSrv "kpasswd" udp 464 "balduzius")
(mkSrv "kerberos-adm" tcp 749 "balduzius")
(mkSrv "kerberos-adm" udp 749 "balduzius")
(mkSrv "http" tcp 80 "bekkalokk")
(mkSrv "https" tcp 443 "bekkalokk")
];
A = pvvHostRecords.bekkalokk.A;