infrastructure/ci/generate.sh
2024-03-24 13:40:06 -07:00

12 lines
481 B
Bash

#!/usr/bin/env bash
set -eu
for node in reisen; do
nix eval --json "${NF_CONFIG_ROOT}#lib.generate.$node.users" | jq -M . > "$NF_CONFIG_ROOT/systems/$node/users.json"
nix eval --json "${NF_CONFIG_ROOT}#lib.generate.$node.systems" | jq -M . > "$NF_CONFIG_ROOT/systems/$node/systems.json"
done
for ciconfig in "${NF_CONFIG_FILES[@]}"; do
echo "processing ${ciconfig}..." >&2
nix run --argstr config "$NF_CONFIG_ROOT/ci/$ciconfig" -f "$NF_INPUT_CI" run.gh-actions-generate
done