activation fix
All checks were successful
Activate Homelab Configuration / rebuild (push) Successful in 18s

This commit is contained in:
Satria 2026-07-18 20:30:35 +07:00
commit 74a739b4e6

View file

@ -19,14 +19,24 @@ jobs:
echo "$SSH_KEY" > ./ssh/deploy_key echo "$SSH_KEY" > ./ssh/deploy_key
chmod 600 ./ssh/deploy_key chmod 600 ./ssh/deploy_key
- name: Rebuild and switch - name: Build and set boot configuration
run: | run: |
ssh -i ./ssh/deploy_key \ ssh -i ./ssh/deploy_key \
-o PasswordAuthentication=no \ -o PasswordAuthentication=no \
-o StrictHostKeyChecking=no \ -o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \ -o UserKnownHostsFile=/dev/null \
root@localhost \ root@localhost \
"bash -lc 'nixos-rebuild switch --refresh --flake git+http://localhost:5080/satr14/nix-flake#homelab -L'" "bash -lc 'nixos-rebuild boot --refresh --flake git+http://localhost:5080/satr14/nix-flake#homelab -L'"
- name: Activate configuration
continue-on-error: true
run: |
ssh -i ./ssh/deploy_key \
-o PasswordAuthentication=no \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
root@localhost \
"bash -lc 'setsid nohup /nix/var/nix/profiles/system/bin/switch-to-configuration switch > /var/log/nixos-switch.log 2>&1 < /dev/null & disown'"
- name: Notify on failure - name: Notify on failure
if: failure() if: failure()
@ -38,15 +48,6 @@ jobs:
-H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \ -H "Actions: view, Action Runs, https://git.satr14.my.id/${{ github.repository }}/actions?workflow=activate.yml; view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \
-d "${{ github.event.head_commit.message }}" -d "${{ github.event.head_commit.message }}"
# - name: Notify on success
# if: success()
# run: |
# curl -s -X POST https://notify.proxy.satr14.my.id/git-flake-updates \
# -H "Title: NixOS Homelab Rebuild Succeeded" \
# -H "Tags: white_check_mark" \
# -H "Actions: view, View Commit, https://git.satr14.my.id/${{ github.repository }}/commit/${{ github.sha }}" \
# -d "${{ github.event.head_commit.message }}"
- name: Clean Up - name: Clean Up
if: always() if: always()
run: rm -f ./ssh/deploy_key run: rm -f ./ssh/deploy_key