Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

ci: disable nix sandbox in test:nix on shared runners

gerrydoro50c7b2245d5b
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d16eba80..022ad4a6b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -131,7 +131,13 @@ test:nix:
image: $NIX_IMAGE
interruptible: true
variables:
- NIX_CONFIG: "experimental-features = nix-command flakes"
+ # The GitLab shared runners create /builds/<group>/<project> world-writable, and Nix's
+ # sandbox init refuses any source/store path that is world-writable or a symlink
+ # ("Path /builds/... is world-writable or a symlink. That's not allowed for security.").
+ # There is no way to have the runner hand us a non-world-writable checkout, so disable the
+ # (local) sandbox — this is the standard fix for Nix-on-GitLab shared runners, and is fine
+ # here: the build runs as root in an ephemeral, trusted container.
+ NIX_CONFIG: "experimental-features = nix-command flakes sandbox = false"
# Point every Nix dir at the cacheable project dir instead of /nix (which GitLab cache
# cannot reach). `nix flake check` + the VM test + three package builds share this store,
# so a warm cache makes the job near-instant.