|
45 | 45 | set -eux
|
46 | 46 | limactl start --name=nixsample --set '.user.name = "${{ env.LIMA_USER }}"' nixos.yaml
|
47 | 47 |
|
48 |
| - - name: "Initialize Home Manager" |
49 |
| - if: false # Disable for now because this step is timing out |
50 |
| - env: |
51 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
52 |
| - LIMA_NAME: "nixsample" |
53 |
| - GUEST_HOME: "/home/lima.linux" |
54 |
| - CONFIG_DIR: "/home/lima.linux/.config" |
55 |
| - HOME_CONFIG_REPO: "https://github.com/nixos-lima/nixos-lima-config-sample.git" |
56 |
| - run: | |
57 |
| - set -eux |
58 |
| - # Create ~/.config if it doesn't already exist |
59 |
| - limactl shell nixsample -- mkdir -p $CONFIG_DIR |
60 |
| - # Checkout HOME_CONFIG_REPO containing your Home Manager configuration flake |
61 |
| - limactl shell nixsample -- git clone $HOME_CONFIG_REPO $CONFIG_DIR/home-manager |
62 |
| - # Temporarily (it will be overwritten on the next nixos-rebuild) add a GitHub access token to nix.conf so |
63 |
| - # we can init Home Manager without getting rate limited by GitHub Actions |
64 |
| - limactl shell nixsample -- sudo sh -c "echo 'access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}' >> /etc/nix/nix2.conf" |
65 |
| - # Initialize Home Manager |
66 |
| - limactl shell nixsample -- nix run home-manager/master -- init --switch |
67 |
| - # Configure subuid/subgid support for running rootless Podman services |
68 |
| - limactl shell nixsample -- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $LIMA_USER |
69 | 48 |
|
70 | 49 | - name: "Update and Rebuild NixOS"
|
71 | 50 | env:
|
|
83 | 62 | limactl shell nixsample -- sudo git init --separate-git-dir=$CONFIG_DIR/nixos-config --shared=group /etc/nixos
|
84 | 63 | limactl shell nixsample -- sudo chown $LIMA_USER:wheel -R $CONFIG_DIR/nixos-config
|
85 | 64 | limactl shell nixsample -- sudo bash -c "cd /etc/nixos ; git checkout master"
|
86 |
| - limactl shell nixsample -- sudo bash -c "NIX_CONFIG='access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}' nixos-rebuild switch --flake .#sample" |
| 65 | + limactl shell nixsample -- sudo bash -c "NIX_CONFIG='access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}' nixos-rebuild boot --flake .#sample" |
| 66 | + limactl stop nixsample |
| 67 | + limactl start nixsample |
| 68 | +
|
| 69 | + - name: "Initialize Home Manager" |
| 70 | + env: |
| 71 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 72 | + LIMA_NAME: "nixsample" |
| 73 | + GUEST_HOME: "/home/lima.linux" |
| 74 | + CONFIG_DIR: "/home/lima.linux/.config" |
| 75 | + HOME_CONFIG_REPO: "https://github.com/nixos-lima/nixos-lima-config-sample.git" |
| 76 | + run: | |
| 77 | + set -eux |
| 78 | + # Create ~/.config if it doesn't already exist |
| 79 | + limactl shell nixsample -- mkdir -p $CONFIG_DIR |
| 80 | + # Checkout HOME_CONFIG_REPO containing your Home Manager configuration flake |
| 81 | + limactl shell nixsample -- git clone $HOME_CONFIG_REPO $CONFIG_DIR/home-manager |
| 82 | + # Initialize Home Manager |
| 83 | + limactl shell nixsample -- bash -c "NIX_CONFIG='access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}' nix run home-manager/master -- init --switch" |
| 84 | + # Configure subuid/subgid support for running rootless Podman services |
| 85 | + #limactl shell nixsample -- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $LIMA_USER |
87 | 86 |
|
88 | 87 | - name: Upload artifacts
|
89 | 88 | uses: actions/upload-artifact@v4
|
|
0 commit comments