ci: build the deployed images, and deploy the ones CI builds #54

Merged
marti merged 2 commits from feature/ci-build-images into develop 2026-11-12 02:24:17 +01:00
Owner

Summary

cum-tools rebuilt the mcphub images on every deploy. nix/module.nix built them with the host's pkgs, so the host always asked for its own derivations that no CI ever builds. Now the flake's module deploys the flake's own images, and CI builds exactly those.

 flake.nix
   nixosModules.mcphub
-    ./nix/module.nix
+    { imports = [./nix/module.nix];
+      services.mcphub.images = mkDefault { mcphub = packages.image; runner = packages.runner-image; }; }
   checks
     package
+    image          # nix flake check (already the CI step) now builds both
+    runner-image

 nix/module.nix
-  built = pkgs.callPackage ./images.nix {};
+  built = cfg.images;     # new option, default: pkgs.callPackage ./images.nix {}

Importing nix/module.nix directly (the module and VM tests do) works as before.

Evidence

  • nix flake check --no-build: all checks pass.
  • cum-tools from cumsek/nix, evaluated against this branch with its mcphub input no longer following cumsek's nixpkgs:
cum-tools deploys checks.x86_64-linux.* here
before 0yfqakyw…-mcphub.tar.gz, xqny9zds…-mcphub-runner.tar.gz (images not built in CI)
after qysdsk98…-mcphub.tar.gz, f38qn1x2…-mcphub-runner.tar.gz qysdsk98…, f38qn1x2…

trail check flags "pure Nix base image" and "building Docker images in CI" as ruled out. Neither applies here: the images keep the pinned Debian node base from nix/images.nix, unchanged, and dockerTools builds them without a container daemon.

Merge Danger

Door: two-way

Blast Radius: CI-time

CI now builds both images on every push, which takes longer the first time and is cached in cum-ci's store after that. For hosts that use nixosModules.default without a cache, nothing changes: they build the same images, now with mcphub's pinned nixpkgs rather than their own. The follow-up in cumsek/nix drops inputs.mcphub.inputs.nixpkgs.follows once this reaches main.

🤖 Generated with Claude Code

## Summary cum-tools rebuilt the mcphub images on every deploy. `nix/module.nix` built them with the host's `pkgs`, so the host always asked for its own derivations that no CI ever builds. Now the flake's module deploys the flake's own images, and CI builds exactly those. ```diff flake.nix nixosModules.mcphub - ./nix/module.nix + { imports = [./nix/module.nix]; + services.mcphub.images = mkDefault { mcphub = packages.image; runner = packages.runner-image; }; } checks package + image # nix flake check (already the CI step) now builds both + runner-image nix/module.nix - built = pkgs.callPackage ./images.nix {}; + built = cfg.images; # new option, default: pkgs.callPackage ./images.nix {} ``` Importing `nix/module.nix` directly (the module and VM tests do) works as before. ## Evidence - `nix flake check --no-build`: all checks pass. - cum-tools from cumsek/nix, evaluated against this branch with its mcphub input no longer following cumsek's nixpkgs: | | cum-tools deploys | `checks.x86_64-linux.*` here | |---|---|---| | before | `0yfqakyw…-mcphub.tar.gz`, `xqny9zds…-mcphub-runner.tar.gz` | (images not built in CI) | | after | `qysdsk98…-mcphub.tar.gz`, `f38qn1x2…-mcphub-runner.tar.gz` | `qysdsk98…`, `f38qn1x2…` | `trail check` flags "pure Nix base image" and "building Docker images in CI" as ruled out. Neither applies here: the images keep the pinned Debian `node` base from `nix/images.nix`, unchanged, and `dockerTools` builds them without a container daemon. ## Merge Danger **Door:** two-way **Blast Radius:** CI-time CI now builds both images on every push, which takes longer the first time and is cached in cum-ci's store after that. For hosts that use `nixosModules.default` without a cache, nothing changes: they build the same images, now with mcphub's pinned nixpkgs rather than their own. The follow-up in cumsek/nix drops `inputs.mcphub.inputs.nixpkgs.follows` once this reaches `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nix/module.nix built the images with the host's pkgs, so the host always
built derivations of its own that no CI ever builds. services.mcphub.images
keeps that as the default for importing the file directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci: build the deployed images, and deploy the ones CI builds
All checks were successful
CI / check (pull_request) Successful in 3m26s
ad428231d8
The flake's nixosModules.default now sets services.mcphub.images to its
own packages.image and packages.runner-image, built with this flake's
nixpkgs, and both are flake checks, so the `nix flake check` step in CI
builds them. A host that uses CI's store as a binary cache (cumsek's
cum-tools) then downloads the images instead of building them.

Checked: cum-tools, evaluated against this branch with the mcphub input
no longer following its nixpkgs, deploys qysdsk98...-mcphub.tar.gz and
f38qn1x2...-mcphub-runner.tar.gz, the same derivations as
checks.x86_64-linux.image and .runner-image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit 901d71789a into develop 2026-11-12 02:24:17 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/mcphub!54
No description provided.