File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 46
46
limactl start --name=nixsample --set '.user.name = "${{ env.LIMA_USER }}"' nixos.yaml
47
47
48
48
- name : " Initialize Home Manager"
49
+ if : false # Disable for now because this step is timing out
49
50
env :
50
51
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
52
LIMA_NAME : " nixsample"
@@ -67,10 +68,22 @@ jobs:
67
68
limactl shell nixsample -- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $LIMA_USER
68
69
69
70
- name : " Update and Rebuild NixOS"
70
- if : false # Disable for now because this step is timing out
71
+ env :
72
+ LIMA_NAME : " nixsample"
73
+ GUEST_HOME : " /home/lima.linux"
74
+ CONFIG_DIR : " /home/lima.linux/.config"
75
+ NIXOS_CONFIG_REPO : " https://github.com/nixos-lima/nixos-lima-config-sample.git"
71
76
run : |
72
77
set -eux
73
- ./setup-rebuild-nixos.sh ${{ env.LIMA_USER }}
78
+ # Create ~/.config if it doesn't already exist
79
+ limactl shell nixsample -- mkdir -p $CONFIG_DIR
80
+ # Checkout NIXOS_CONFIG_REPO containing your NixOS host configuration flake
81
+ limactl shell nixsample -- git clone --bare $NIXOS_CONFIG_REPO $CONFIG_DIR/nixos-config
82
+ # Setup NixOS system config in separate-git-dir owned by user, with working directory in /etc/nixos
83
+ limactl shell nixsample -- sudo git init --separate-git-dir=$CONFIG_DIR/nixos-config --shared=group /etc/nixos
84
+ limactl shell nixsample -- sudo chown $LIMA_USER:wheel -R $CONFIG_DIR/nixos-config
85
+ 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"
74
87
75
88
- name : Upload artifacts
76
89
uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments