diff --git a/.github/workflows/org-run.yml b/.github/workflows/org-run.yml index b64257d23..84657c667 100644 --- a/.github/workflows/org-run.yml +++ b/.github/workflows/org-run.yml @@ -394,10 +394,22 @@ jobs: esac git clone "${clone_args[@]}" "$url" "$dest" done < <(jq -c '.[]' <<<"$CHECKOUTS_JSON") + - name: Prepare Nix build users + run: | + set -euo pipefail + getent group nixbld >/dev/null || groupadd --system nixbld + for index in $(seq 1 32); do + user="nixbld${index}" + if ! getent passwd "$user" >/dev/null; then + useradd --system --no-create-home --home-dir /var/empty \ + --shell /usr/sbin/nologin --gid nixbld --groups nixbld "$user" + fi + done - name: Run command if: ${{ matrix.mode == 'single' }} env: ORG_RUN_COMMAND: ${{ matrix.command }} + NIX_CONFIG: "extra-experimental-features = nix-command flakes" run: | git config --global --add safe.directory '*' cd "$GITHUB_WORKSPACE/target" @@ -408,6 +420,7 @@ jobs: env: CHECKOUTS_JSON: ${{ toJSON(matrix.checkouts) }} ORG_RUN_COMMAND: ${{ matrix.command }} + NIX_CONFIG: "extra-experimental-features = nix-command flakes" run: | git config --global --add safe.directory '*' cd "$GITHUB_WORKSPACE"