nix: split module-eval into per-subsystem checks

The single module-eval derivation forced ~62 full nixosSystem
fixtures live at once to compute its cases list: 10.6GB peak RSS /
5m25s to evaluate, by far the dominant cost in nix flake check.
Splits it into 21 independent checks.module-eval-* derivations
(1-7 fixtures each) sharing builders/helpers via module-eval/lib.nix,
so no single derivation needs more than a handful of fixtures live
at once. A few cases spanning two clusters carry a small duplicated
fixture rather than threading shared state through lib.nix.
This commit is contained in:
müde 2026-09-20 04:25:54 +02:00
commit dc418a5223
24 changed files with 3760 additions and 2997 deletions

View file

@ -16,12 +16,98 @@ in
{
formatting = treefmt-eval.config.build.check self;
# The only check here that covers **nix**. Every other one is a Rust
# The only checks here that cover **nix**. Every other one is a Rust
# derivation, so a `.nix`-only diff moves no hash and the whole set is
# cache hits — green without evaluating what changed. See the file's
# header for what belongs in it and what needs something that executes
# rather than evaluates.
module-eval = import ./module-eval.nix {
# cache hits — green without evaluating what changed. See
# ./module-eval/lib.nix for what belongs in this suite and what needs
# something that executes rather than evaluates.
#
# Split into one derivation per subsystem cluster (./module-eval/*.nix)
# rather than one `module-eval` derivation: the combined version forced
# ~62 full `nixosSystem` fixtures live at once to compute its single
# `cases` list, measured at 10.6GB peak RSS / 5m25s to evaluate. Each
# cluster below only holds its own handful of fixtures.
module-eval-core-toggle = import ./module-eval/core-toggle.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-swarm-services-switch = import ./module-eval/swarm-services-switch.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-nats-authelia = import ./module-eval/nats-authelia.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-matrix-core = import ./module-eval/matrix-core.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-grafana = import ./module-eval/grafana.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-bao-basics = import ./module-eval/bao-basics.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-bao-matrix-reader = import ./module-eval/bao-matrix-reader.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-bao-grants = import ./module-eval/bao-grants.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-bao-controller = import ./module-eval/bao-controller.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-secret-publisher = import ./module-eval/secret-publisher.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-bao-otel-collector = import ./module-eval/bao-otel-collector.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-swarm-otel-core = import ./module-eval/swarm-otel-core.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-swarm-otel-identity = import ./module-eval/swarm-otel-identity.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-hive-otel = import ./module-eval/hive-otel.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-name-guards = import ./module-eval/name-guards.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-otel = import ./module-eval/agent-otel.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-queue-bao = import ./module-eval/agent-queue-bao.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-memory = import ./module-eval/agent-memory.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-plugins = import ./module-eval/agent-plugins.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-icon = import ./module-eval/agent-icon.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};
module-eval-agent-matrix = import ./module-eval/agent-matrix.nix {
inherit pkgs self nixosSystem;
inherit (pkgs) lib;
};