lab-infra/meta/verify.nix
sinavir 2ac0a35c5e
Some checks failed
Check meta / check_meta (push) Successful in 22s
Check meta / check_meta (pull_request) Successful in 21s
lint / check (push) Successful in 23s
lint / check (pull_request) Successful in 24s
build configuration / build_krz01 (pull_request) Failing after 3m26s
chore(meta): Revamp and remove DNS for now
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.
2024-10-17 13:36:27 +02:00

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