Julien Malka
d05fcb7e2c
Some checks failed
Check meta / check_dns (push) Failing after 19s
Check meta / check_meta (push) Successful in 20s
build configuration / build_and_cache_storage01 (push) Failing after 35s
build configuration / build_and_cache_compute01 (push) Failing after 36s
build configuration / build_and_cache_rescue01 (push) Failing after 33s
build configuration / build_and_cache_geo01 (push) Failing after 32s
build configuration / build_and_cache_geo02 (push) Failing after 31s
build configuration / build_and_cache_vault01 (push) Failing after 33s
build configuration / build_and_cache_web01 (push) Failing after 32s
build configuration / build_and_cache_web02 (push) Failing after 33s
lint / check (push) Failing after 28s
build configuration / build_and_cache_krz01 (push) Failing after 1m55s
build configuration / build_and_cache_bridge01 (push) Failing after 33s
36 lines
829 B
Nix
36 lines
829 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" { inherit pkgs; };
|
|
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.writeZone "dgnum.eu" (
|
|
pkgs.lib.recursiveUpdate { SOA.serial = 0; } (
|
|
import ./dns.nix {
|
|
inherit dns;
|
|
|
|
lib = pkgs.lib // {
|
|
extra = import ../lib/nix-lib;
|
|
};
|
|
}
|
|
)
|
|
);
|
|
}
|