forked from DGNum/lab-infra
2ac0a35c5e
We don't have a dns server for the lab infra for now. Later we will probably reintroduce the tooling for our dns server. This will be good for people to get into understanding the main infra repository.
23 lines
539 B
Nix
23 lines
539 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 { };
|
|
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;
|
|
|
|
}
|