Skip to content

Commit f5dd2c7

Browse files
committed
Try adding a GitHub token in guest /etc/nix/nix.conf
1 parent e64c81e commit f5dd2c7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/macos.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ jobs:
4545
set -eux
4646
limactl start --name=nixsample --set '.user.name = "${{ env.LIMA_USER }}"' nixos.yaml
4747
48-
- name: "List Lima Instances"
49-
run: |
50-
limactl list
51-
5248
- name: "Initialize Home Manager"
5349
env:
5450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -58,13 +54,15 @@ jobs:
5854
HOME_CONFIG_REPO: "https://github.com/nixos-lima/nixos-lima-config-sample.git"
5955
run: |
6056
set -eux
61-
limactl list
6257
# Create ~/.config if it doesn't already exist
6358
limactl shell nixsample -- mkdir -p $CONFIG_DIR
6459
# Checkout HOME_CONFIG_REPO containing your Home Manager configuration flake
6560
limactl shell nixsample -- git clone $HOME_CONFIG_REPO $CONFIG_DIR/home-manager
61+
# Temporarily (it will be overwritten on the next nixos-rebuild) add a GitHub access token to nix.conf so
62+
# we can init Home Manager without getting rate limited by GitHub Actions
63+
limactl shell nixsample -- sudo echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" >> /etc/nix/nix.conf
6664
# Initialize Home Manager
67-
limactl shell nixsample -- env GITHUB_TOKEN=$GITHUB_TOKEN nix run home-manager/master -- init --switch
65+
limactl shell nixsample -- nix run home-manager/master -- init --switch
6866
# Configure subuid/subgid support for running rootless Podman services
6967
limactl shell nixsample -- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $LIMA_USER
7068

0 commit comments

Comments
 (0)