Set nix options through NIX_CONFIG in CI
Some checks failed
Build and Deploy to Production / check (push) Successful in 20s
Build and Deploy to Production / build (push) Failing after 1s
Build and Deploy to Production / deploy (push) Has been skipped

The runner mounts a persistent nix-store volume over /nix, and the
nixos/nix image makes /etc/nix/nix.conf a symlink into /nix/store. When
the volume and image versions differ, the link dangles and appending to
it fails before checkout. That broke asxpio and datacenterbingo CI on
2026-10-18.

Pass the settings in NIX_CONFIG instead, with build-users-group empty
and the sandbox off as the image config has them.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-10-18 09:48:30 +04:00
commit 6e2cc3c153
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
2 changed files with 16 additions and 2 deletions

View file

@ -10,10 +10,17 @@ jobs:
# build blocks deploy — Forgejo has no cross-workflow needs. # build blocks deploy — Forgejo has no cross-workflow needs.
check: check:
runs-on: nix-latest runs-on: nix-latest
# Settings via env, not /etc/nix/nix.conf: in the image that is a
# symlink into /nix/store, which the runner's nix-store volume
# shadows, so it dangles once the image moves on.
env:
NIX_CONFIG: |
experimental-features = nix-command flakes
build-users-group =
sandbox = false
steps: steps:
- name: Prepare container for actions - name: Prepare container for actions
run: | run: |
echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
nix-env -iA nixpkgs.nodejs_22 nix-env -iA nixpkgs.nodejs_22
- name: Checkout - name: Checkout

View file

@ -8,10 +8,17 @@ on:
jobs: jobs:
check: check:
runs-on: nix-latest runs-on: nix-latest
# Settings via env, not /etc/nix/nix.conf: in the image that is a
# symlink into /nix/store, which the runner's nix-store volume
# shadows, so it dangles once the image moves on.
env:
NIX_CONFIG: |
experimental-features = nix-command flakes
build-users-group =
sandbox = false
steps: steps:
- name: Prepare container for actions - name: Prepare container for actions
run: | run: |
echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
nix-env -iA nixpkgs.nodejs_22 nix-env -iA nixpkgs.nodejs_22
- name: Checkout - name: Checkout