about summary refs log tree commit diff
path: root/ops/dns/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-03-14T00·58+0200
committertazjin <mail@tazj.in>2021-03-15T21·23+0000
commitb4e87f8254355678c37056bcbeb474f4a0a50648 (patch)
treeae066da7322ed2ecc1bd20c16397f80cbd4000be /ops/dns/default.nix
parentb6895a5b309eca4f12062f394331fff1b9e3dff8 (diff)
feat(ops/dns): Import tvl.fyi DNS zone into depot r/2280
Imports the current state of the tvl.fyi zone and configures simple CI
checks on the file format.

No deployment automation exists for this (yet?).

Change-Id: Ia7d72e02b9f6d3adef994c5dc1898cc0df9dfcfb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2600
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
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;
+}