- Nix 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
nix-runner image / build-and-push (push) Successful in 1m47s
|
||
| .forgejo/workflows | ||
| nix-modules | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
runner-images
Container image definitions for the Forgejo Actions runner on augustinus,
built with nix (flake-parts + import-tree, mirroring
infra.jingus.dev) and published to the Forgejo container registry. The
runner itself (labels → images) lives in infra.jingus.dev →
features/forgejo-runner.nix.
Images
| Image | Attribute | Registry |
|---|---|---|
| nix-runner | .#nix-runner-image |
git.jingus.dev/jingus/nix-runner |
nix-runner
The image behind the nix runner label — everything a CI job needs to
build with nix: the nix CLI (flakes enabled), git/node for
actions/checkout, jq, curl, and the attic client. An /etc/nix/nix.conf
is baked in that substitutes from cache.jingus.dev before
cache.nixos.org, so every CI pull hits the private cache first.
Notes:
- Single-user (root) store with
sandbox = false— thenixbldgroup doesn't exist in-container and dockerTools derivations are never substitutable anyway. - The baked nix.conf must stay in sync with infra.jingus.dev →
nix-modules/features/base.nix(substituters + trusted keys) — rotate attic keys in both repos. - The package must stay publicly readable under
jingus' Forgejo packages so job runners can pull it anonymously.
Publishing
Automated on every push to main (.forgejo/workflows/nix-runner.yml)
via jingus/actions:
- attic-cache pushes every locally built path to the binary cache.
- publish-nix-image computes the image's identity (its output store
path hash, by pure eval) and publishes under that tag plus
:latest. When the identity tag already exists, the build is skipped entirely (~1 minute no-op runs); superseded identity tags are pruned, keeping one rollback tag (docker pull …:<old-hash>to recover fast).
Manual fallback (e.g. if CI is broken). Note the gunzip: skopeo must not be handed the gzipped archive directly, or it re-synthesizes the manifest nondeterministically:
nix build .#nix-runner-image
gzip -dc result > /tmp/nix-runner.tar
nix shell nixpkgs#skopeo -c skopeo copy --insecure-policy \
--dest-creds "jingus:<forgejo-token-with-write:package>" \
docker-archive:/tmp/nix-runner.tar \
docker://git.jingus.dev/jingus/nix-runner:latest
Adding an image
nix-modules/packages/<name>/default.nix— a deterministicdockerTools.buildImage(nocreated = now; identity-tag skipping depends on reproducibility)..forgejo/workflows/<name>.yml— checkout → attic-cache → publish-nix-image, with the image path and attribute.- Reference the registry image from a runner label in infra.jingus.dev →
features/forgejo-runner.nix.