name: Nix build

on:
  push:
  pull_request:

jobs:
  build-nix:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v5
    - uses: cachix/install-nix-action@v31
      with:
        nix_path: nixpkgs=channel:nixos-unstable
    #- uses: DeterminateSystems/magic-nix-cache-action@v13
    - run: nix build -L -j auto
    - run: nix develop --command echo OK
    - run: nix flake check -vL -j auto
