name: "Check Nix flake"
on:
    push:
        branches: ["main"]
    pull_request:
        branches: ["main"]
    merge_group:
concurrency:
    group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
    cancel-in-progress: true
jobs:
    health-check:
        name: "Perform Nix flake checks"
        runs-on: ubuntu-latest
        steps:
            - name: Install nix
              uses: https://github.com/DeterminateSystems/nix-installer-action@main
            - uses: actions/checkout@v4
            - run: nix flake check --accept-flake-config
