#!/usr/bin/env bash # CI eval tier — same coverage as `nix flake check --no-build`, bounded # memory. One evaluator process walking every output accumulates ~6.0 GB # peak RSS on this repo (measured 2026-07-12, eval-cache off): that # OOM'd the whole 4 GB VPS behind git.bemagri.xyz, and can never fit the # runner's 2 GB container cap. Evaluating ONE output per fresh nix # process caps the peak at the largest single output (~0.93 GB, # downstream-template-system): the heap is freed when each process # exits. Wall time is worse (shared nixpkgs re-eval per process); # irrelevant next to the memory cap. Used by .gitea/workflows/check.yml # and bump.yml; runs anywhere (`bash tools/ci-eval.sh`). set -euo pipefail sys=${1:-x86_64-linux} list() { nix eval --raw ".#$1" \ --apply 'a: builtins.concatStringsSep "\n" (builtins.attrNames a)' } evaluate() { echo "eval: $1" nix eval --raw ".#$1" >/dev/null } for a in $(list "checks.$sys"); do evaluate "checks.$sys.$a.drvPath" done for c in $(list nixosConfigurations); do evaluate "nixosConfigurations.$c.config.system.build.toplevel.drvPath" done for h in $(list homeConfigurations); do evaluate "homeConfigurations.$h.activationPackage.drvPath" done echo "ci-eval: all outputs evaluated."