tvl-depot/users/tazjin/dns/default.nix
Vincent Ambo 605302091d refactor(tazjin/dns): Add zone validity checks in CI
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>
2021-04-14 15:23:55 +00:00

14 lines
420 B
Nix

# 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;
}