about summary refs log tree commit diff
path: root/ops/dns/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ops/dns/default.nix')
-rw-r--r--ops/dns/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/ops/dns/default.nix b/ops/dns/default.nix
new file mode 100644
index 000000000000..d2f75f836c00
--- /dev/null
+++ b/ops/dns/default.nix
@@ -0,0 +1,14 @@
+# Performs simple (local-only) validity checks on DNS zones.
+{ pkgs, ... }:
+
+let
+  checkZone = zone: file: pkgs.runCommandNoCC "${zone}-check" {} ''
+    ${pkgs.bind}/bin/named-checkzone -i local ${zone} ${file} | tee $out
+  '';
+
+  zones = {
+    tvl-fyi = checkZone "tvl.fyi" ./tvl.fyi.zone;
+  };
+in zones // {
+  meta.targets = builtins.attrNames zones;
+}