about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/tazjin/dns/default.nix14
-rwxr-xr-xusers/tazjin/dns/import (renamed from users/tazjin/cloud-dns/import)5
-rw-r--r--users/tazjin/dns/kontemplate.works.zone (renamed from users/tazjin/cloud-dns/kontemplate-works)0
-rw-r--r--users/tazjin/dns/tazj.in.zone (renamed from users/tazjin/cloud-dns/root-tazj-in)0
4 files changed, 17 insertions, 2 deletions
diff --git a/users/tazjin/dns/default.nix b/users/tazjin/dns/default.nix
new file mode 100644
index 000000000000..14b9d428641c
--- /dev/null
+++ b/users/tazjin/dns/default.nix
@@ -0,0 +1,14 @@
+# Performs simple (local-only) validity checks on DNS zones.
+{ depot, pkgs, ... }:
+
+let
+  inherit (depot.nix.utils) drvTargets;
+
+  checkZone = zone: file: pkgs.runCommandNoCC "${zone}-check" {} ''
+    ${pkgs.bind}/bin/named-checkzone -i local ${zone} ${file} | tee $out
+  '';
+
+in drvTargets {
+  kontemplate-works = checkZone "kontemplate.works"./kontemplate.works.zone;
+  tazj-in = checkZone "tazj.in" ./tazj.in.zone;
+}
diff --git a/users/tazjin/cloud-dns/import b/users/tazjin/dns/import
index e79e426b5553..8ea1d694c9a1 100755
--- a/users/tazjin/cloud-dns/import
+++ b/users/tazjin/dns/import
@@ -1,10 +1,11 @@
 #!/bin/sh
 set -ue
 
-# Imports a zone file into a Google Cloud DNS zone of the same name
+# Imports a zone file into Google Cloud DNS
 readonly ZONE="${1}"
+readonly FILE="${2}"
 
-gcloud dns record-sets import "${ZONE}" \
+gcloud dns record-sets import "${FILE}" \
        --project composite-watch-759 \
        --zone-file-format \
        --delete-all-existing \
diff --git a/users/tazjin/cloud-dns/kontemplate-works b/users/tazjin/dns/kontemplate.works.zone
index 326a129d2105..326a129d2105 100644
--- a/users/tazjin/cloud-dns/kontemplate-works
+++ b/users/tazjin/dns/kontemplate.works.zone
diff --git a/users/tazjin/cloud-dns/root-tazj-in b/users/tazjin/dns/tazj.in.zone
index 43db5834a0ca..43db5834a0ca 100644
--- a/users/tazjin/cloud-dns/root-tazj-in
+++ b/users/tazjin/dns/tazj.in.zone