Take a look at the rules_nixpkgs guide
to get started.
You can gradually integrate Nix with your Bazel project, without the need to fully commit to it. You can always iterate later depending on your needs and the problems that you're trying to solve.
Below are some of the steps that can be taken into that direction:
- Use Nix to install Bazel and all the related tooling. This is the easiest way to learn more about Nix. Using it as a package manager to provide a development environment.
- Use Nix to install all the necessary third party dependencies of your build. This goes one step further by trying to provide the whole environment for your builds in a versioned and reproducible way.
- Use rules_nixpkgs to provide hermetic builds by providing the toolchains and environments with a tight integration with the Bazel build system. This allows you to fully take advantage of Nix.