name: Build and Cache with Nix on: workflow_dispatch: push: branches: [ "main" ] paths: [ 'src/**.rs', 'build.rs', 'Cargo.toml', 'Cargo.lock', 'nix/package.nix', 'flake.nix', 'flake.lock' ] permissions: contents: read jobs: populate-cache: runs-on: ubuntu-latest steps: - name: "Checkout" uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 with: nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v16 with: name: nyx authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: "Build with Nix" run: nix build