Skip to content

Build the site from a locked flake and check pull requests - #95

Merged
clhodapp merged 1 commit into
mainfrom
feat/locked-site-build
Nov 11, 2026
Merged

clhodapp merged 1 commit into
mainfrom
feat/locked-site-build

Conversation

@clhodapp

Copy link
Copy Markdown
Contributor

The pages workflow ran nix run 'nixpkgs#mdbook' -- build. Each deploy therefore used the mdBook of whatever nixpkgs the flake registry resolved on that run. Pull requests ran no checks.

This adds a caisson flake, laid out as topside is, with a committed flake.lock.

  • packages.<system>.site runs mdBook from the nixpkgs that flake.lock pins (nixos-unstable at f4a03c008967841f2a0b3cb7c436fc6fc31671f6, mdBook 0.5.4).
  • The package copies assets/brand into site/assets/brand, as the workflow did before.
  • The package's output is the site/ directory that Pages serves.
  • checks.<system>.site builds the package, and checks.<system>.treefmt checks the formatting of the Nix files.
  • The pins of the checks and of the formatter live in tests/dependencies/, as in topside.
  • pages.yml builds .#site and uploads result/.
  • The new check.yml runs nix flake check on every pull request and every push to main.
  • Every action in both workflows is pinned by commit SHA, at the major versions pages.yml used.
  • The README describes the local build, mdbook serve from the locked nixpkgs, and the checks.

book.toml uses no preprocessors and the repository has no build-tool lockfile, so mdBook is the only build dependency.

Verification

  • nix build '.#site' on x86_64-linux produced a tree identical to a plain nix run 'nixpkgs#mdbook' -- build of main followed by the cp (diff -r reports no differences). The registry's mdBook is 0.5.4 today as well.
  • nix flake check passes.

🤖 Generated with Claude Code

The pages workflow ran `nix run 'nixpkgs#mdbook'`, so each deploy used
the mdBook of whatever nixpkgs the flake registry resolved that day.

flake.nix is a caisson flake laid out as topside is. Its `site`
package runs mdBook from the nixpkgs that flake.lock pins, copies
assets/brand into site/assets/brand, and outputs site/. The pages
workflow builds that package and uploads `result/`.

`nix flake check` builds the package and checks the formatting of the
Nix files. The new check workflow runs it on every pull request and
every push to main. Every action in both workflows is pinned by
commit SHA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clhodapp clhodapp self-assigned this Nov 11, 2026
@clhodapp clhodapp changed the title feat: build the site from a locked flake and check pull requests Build the site from a locked flake and check pull requests Nov 11, 2026
@clhodapp
clhodapp merged commit 03aaf64 into main Nov 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant