name: Run Nix Flake Checks on: workflow_call: workflow_dispatch: inputs: lockFile: description: 'flake.lock file' type: string jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/clean-disk with: purge-packages: false - uses: DeterminateSystems/nix-installer-action@main with: extra-conf: | accept-flake-config = true - uses: DeterminateSystems/magic-nix-cache-action@v7 - uses: cachix/cachix-action@v15 with: name: daylin authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: write lock file if: "${{ inputs.lockFile != '' }}" run: | echo '${{ inputs.lockFile }}' > flake.lock git diff - name: Build run: | set -euo pipefail # cachix watch-exec daylin -- nix build '.#checks.x86_64-linux.makePackages' host=othalan system_attr=$(nix run . -- output --host "$host" --flake .) system_path=$(nix derivation show $system_attr | jq -r '.[].inputDrvs | with_entries(select(.key|match("system-path";"i"))) | keys | .[]') echo "path to system-path drv ==> $system_path" cachix watch-exec daylin -- nix build --print-build-logs "$system_path^*"