Skip to content

GitHub Actions

nixbuild.net provides a GitHub Action, nixbuild-action, that configures Nix on GitHub runners to use nixbuild.net as a remote builder.

The action authenticates with an auth token, which you should store as a GitHub secret.

If your repository has a flake.nix, the simplest option is the reusable CI workflow, which builds your flake's checks and/or packages:

jobs:
  checks:
    uses: nixbuild/nixbuild-action/.github/workflows/ci-workflow.yml@v27
    secrets:
      nixbuild_token: ${{ secrets.nixbuild_token }}

Otherwise, install Nix and add the action to your job, then use Nix as usual:

steps:
  - uses: actions/checkout@v6
  - uses: nixbuild/nix-quick-install-action@v35
  - uses: nixbuild/nixbuild-action@v27
    with:
      nixbuild_token: ${{ secrets.nixbuild_token }}
  - run: nix build ...

See the nixbuild-action repository for all options, including remote store building, build summaries, nixbuild.net settings and enterprise deployments.