Tom Hubrecht
1d686b740b
All checks were successful
Check meta / check_meta (push) Successful in 28s
Check meta / check_dns (push) Successful in 52s
build configuration / build_vault01 (push) Successful in 1m13s
build configuration / build_storage01 (push) Successful in 1m18s
build configuration / build_compute01 (push) Successful in 1m22s
build configuration / build_web02 (push) Successful in 56s
lint / check (push) Successful in 23s
build configuration / build_web01 (push) Successful in 1m40s
build configuration / build_rescue01 (push) Successful in 1m9s
build configuration / push_to_cache (push) Successful in 2m17s
34 lines
822 B
Nix
34 lines
822 B
Nix
# Nix expression to check if meta module is evaluating correctly.
|
|
# To do so run `nix-build ./verify.nix`
|
|
let
|
|
sources = import ../npins;
|
|
pkgs = import sources.nixpkgs { };
|
|
|
|
dns = import sources."dns.nix";
|
|
|
|
lib = import sources.nix-lib {
|
|
inherit (pkgs) lib;
|
|
|
|
keysRoot = ../keys;
|
|
};
|
|
in
|
|
|
|
{
|
|
meta =
|
|
let
|
|
config = (import ./.) pkgs.lib;
|
|
failed = builtins.map (x: "- ${x.message}") (builtins.filter (x: !x.assertion) config.assertions);
|
|
in
|
|
if (failed != [ ]) then
|
|
throw ''
|
|
|
|
Failed assertions:
|
|
${builtins.concatStringsSep "\n" failed}
|
|
''
|
|
else
|
|
pkgs.writers.writeJSON "meta.json" config;
|
|
|
|
dns = dns.util.${builtins.currentSystem}.writeZone "dgnum.eu" (
|
|
pkgs.lib.recursiveUpdate { SOA.serial = 0; } (import ./dns.nix { inherit dns lib; })
|
|
);
|
|
}
|