clanCore module: add clanSchema top level option

This commit is contained in:
DavHau
2023-09-02 18:28:31 +02:00
parent 75cfd84949
commit a0d1b09b1d
2 changed files with 19 additions and 7 deletions

View File

@@ -5,9 +5,13 @@
check-clan-template = pkgs.writeShellScriptBin "check-clan-template" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
export TMPDIR=$(${pkgs.coreutils}/bin/mktemp -d)
trap "${pkgs.coreutils}/bin/chmod -R +w '$TMPDIR'; ${pkgs.coreutils}/bin/rm -rf '$TMPDIR'" EXIT
export PATH="${lib.makeBinPath [
pkgs.coreutils
pkgs.curl
pkgs.gitMinimal
pkgs.gnugrep
pkgs.jq
@@ -35,6 +39,9 @@
echo check machine1 appears in nixosConfigurations
nix flake show --json | jq '.nixosConfigurations' | grep -q machine1
echo check machine1 jsonschema can be evaluated
nix eval .#nixosConfigurations.machine1.config.clanSchema
'';
};
in