CI runner images
  • Nix 56.7%
  • Just 39.8%
  • Shell 3.5%
Find a file
Simon Shine b3599f5546
All checks were successful
Build, push and test runner images / build-and-push (push) Successful in 2m19s
Build, push and test runner images / test-image (push) Successful in 1m54s
feat(nixos): provide an unprivileged user for tools that refuse root
Jobs run as root, which suits nix: the store is inside the container and only root can
write it. Postgres disagrees -- initdb refuses to run as root outright, with no override
-- so external-dns-pgregistry's integration tests have never passed in CI.

image:
- A runner user at uid 1000, in /etc/passwd because initdb resolves its own uid through
  getpwuid and fails on one that is not there.
- /tmp at 1777 and /home/runner writable: store paths are read-only, so these are the
  only places an unprivileged step can put a cluster or a build cache.
- as-runner wraps setpriv, so a workflow step reads as-runner just test-integration
  rather than spelling out the uid, the gid and HOME each time.
- Deliberately not an image-wide USER, which would take nix's store writes with it, and
  util-linux stays off PATH, where it would take kill and more from coreutils.

justfile:
- test-image asserts all of the above by reading the layer, since the nixos runner has
  no docker daemon to run a container with. Each assertion was checked against a
  deliberately broken image.
2026-08-28 07:43:07 +02:00
.forgejo chore(ci): Move build/push into justfile so CI calls just 2026-05-14 15:18:46 +02:00
nix feat(nixos): provide an unprivileged user for tools that refuse root 2026-08-28 07:43:07 +02:00
.envrc feat: initial commit 2026-04-16 18:05:33 +02:00
.gitignore feat: initial commit 2026-04-16 18:05:33 +02:00
flake.lock chore(ci): Update nixos to 20260820 2026-08-22 22:10:43 +02:00
flake.nix chore: refactor flake 2026-07-26 09:13:58 +02:00
justfile feat(nixos): provide an unprivileged user for tools that refuse root 2026-08-28 07:43:07 +02:00