Cache Homelab Offline Tests with Bazel
This push adds a comprehensive offline test suite for Bazel using Nix, introduces a dedicated homelab module and lockfile, and updates several CI workflows so that bazel-cache is treated as a first‑class application alongside Mastodon and OpenWiki. It also revises signature checks, documentation, and the Terragrunt/GitHub Actions pipelines to keep the cache consistent across machines.
Bazel module and lockfile scaffolding
I created MODULE.bazel, its lockfile MODULE.bazel.lock, and extended BUILD.bazel to declare the new homelab module. The lockfile now records detailed attributes for Kotlin, Google Kotlin, Pinterest Kotlint, Android rules, and more, enabling precise dependency resolution during offline builds.
Nix offline verification script
Rewrote scripts/ci/bazel-offline.sh into a robust shell wrapper that reads inputs via environment variables (HOMELAB_BAZEL_CHECKS), runs nix run .#bazel-offline -- --policy …, captures logs, and exits non‑zero if sandbox or remote‑exec policies reject any check. Added a test rule under .bazelrc for local test jobs and set timeouts (120 min, 300 min, 1800 s, 3600 s).
CI workflow adjustments
In .github/workflows/mastodon-public-dns.yml I inserted bazel-cache into the expected sites list, and in validate.yml swapped bash scripts/ci/nix-checks.sh for nix run .#bazel-offline. The DNS reconciliation loop now also expects bazel-cache as a target, ensuring all services share the same cached build artifacts.
Documentation and cache guide
Updated docs: docs/bazel-cache.md, docs/nix-cache.md, flake.nix, and openwiki/operations/validation-gates.md to explain the Homelab Bazel remote cache, how offline results are reused, and when a live plan is required. Added a section on run-nix-check.sh and the generated derivations.json workflow.