diff options
author | Vincent Ambo <mail@tazj.in> | 2021-04-14T15·20+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-04-14T15·23+0000 |
commit | 605302091d6f35f6c6cd56170fde1c932cdb28ee (patch) | |
tree | 90cef542b09b8fd5cabcec71936198ae2a342e18 /users/tazjin/dns/default.nix | |
parent | b2c0b747442db4dd6d28091a4cd5ceb0ca2a159f (diff) |
refactor(tazjin/dns): Add zone validity checks in CI r/2510
Same as //ops/dns Change-Id: I0399efd2e48956ec91833386adff27d94d08ef1e Reviewed-on: https://cl.tvl.fyi/c/depot/+/3013 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/dns/default.nix')
-rw-r--r-- | users/tazjin/dns/default.nix | 14 |
1 files changed, 14 insertions, 0 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; +} |