fix: remove obsolete Nix configuration files for delta setup #435
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nix Flake Check | |
on: | |
pull_request: | |
paths: | |
- '**.nix' | |
- '**.age' | |
- '.github/workflows/check.yml' | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '**.nix' | |
- '**.age' | |
- '.github/workflows/check.yml' | |
workflow_dispatch: | |
jobs: | |
get-hosts: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
outputs: | |
hosts: ${{ steps.set-hosts.outputs.hosts }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- id: set-hosts | |
run: echo "hosts=$(nix eval .#nixosConfigurations --apply builtins.attrNames --json)" >> $GITHUB_OUTPUT | |
check-hosts: | |
needs: get-hosts | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
host: ${{ fromJson(needs.get-hosts.outputs.hosts) }} | |
fail-fast: false | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: DeterminateSystems/nix-installer-action@main | |
with: | |
determinate: true | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check host ${{ matrix.host }} | |
run: nix build .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel --dry-run | |
auto-update: | |
runs-on: ubuntu-latest | |
needs: check-hosts | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git checkout -b auto-update && git reset --hard origin/main && git push origin auto-update -f | |
- run: curl -d "Github Actions Update" ntfy.sh/${{ secrets.NTFY_UPDATE_TOPIC }} |