From 10998e50ad40254cda3449b70314638cbba8d87e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 19 Dec 2025 14:42:36 +0100 Subject: [PATCH] ci(test-virgin-user): preserve NIX_CONFIG across sudo to avoid GitHub API rate limits https://chatgpt.com/share/6945565e-f1b0-800f-86d5-8d0083fe3390 --- .github/workflows/test-virgin-user.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-virgin-user.yml b/.github/workflows/test-virgin-user.yml index d2ecd63..d1585cf 100644 --- a/.github/workflows/test-virgin-user.yml +++ b/.github/workflows/test-virgin-user.yml @@ -49,17 +49,19 @@ jobs: chown -R dev:dev /nix chmod 0755 /nix chmod 1777 /nix/store + sudo -H -u dev env \ + HOME=/home/dev \ + NIX_CONFIG="$NIX_CONFIG" \ + PKGMGR_DISABLE_NIX_FLAKE_INSTALLER=1 \ + bash -lc " + set -euo pipefail + cd /opt/src/pkgmgr + make setup-venv + . \"\$HOME/.venvs/pkgmgr/bin/activate\" - sudo -H -u dev env HOME=/home/dev PKGMGR_DISABLE_NIX_FLAKE_INSTALLER=1 bash -lc " - set -euo pipefail - cd /opt/src/pkgmgr + pkgmgr version pkgmgr - make setup-venv - . \"\$HOME/.venvs/pkgmgr/bin/activate\" - - pkgmgr version pkgmgr - - export NIX_REMOTE=local - nix run /opt/src/pkgmgr#pkgmgr -- version pkgmgr - " + export NIX_REMOTE=local + nix run /opt/src/pkgmgr#pkgmgr -- version pkgmgr + " '