Skip to content

fix(flake): Stop relying on the registry for lookups of flake references #98

fix(flake): Stop relying on the registry for lookups of flake references

fix(flake): Stop relying on the registry for lookups of flake references #98

Workflow file for this run

---
name: Deploy πŸš€
'on':
push:
branches:
- main
paths:
- '**.nix'
- '**.age'
- 'flake.lock'
concurrency:
group: ci-${{ github.ref }}-deploy
cancel-in-progress: true
jobs:
check:
name: Check βœ”οΈ
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v10
- uses: DeterminateSystems/magic-nix-cache-action@v4
- uses: cachix/cachix-action@v14
with:
name: etu
extraPullNames: 'nix-community'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Check the flake
run: 'nix flake check'
deploy:
name: Deploy πŸš€
runs-on: ubuntu-22.04
needs: check
# Don't cancel jobs if one job fails
continue-on-error: true
strategy:
matrix:
hostname:
- server-main-elis
- server-sparv
- vps06
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v10
- uses: DeterminateSystems/magic-nix-cache-action@v4
- uses: cachix/cachix-action@v14
with:
name: etu
extraPullNames: 'nix-community'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# Build systems.
- name: Build system derivation
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 60
command: 'nix build .#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel'
# Configure SSH key
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_ed25519
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
# Deploy systems
- name: Deploy system
run: 'nix develop -c deploy --skip-checks --targets .#${{ matrix.hostname }}'