Nix Hydra Pipeline
Right now the Shared Runners feature let's users run build processes on shared servers and save the build artifacts. The nix package manager provides a syntax to specify dependencies and build processes in a pure way which enables the creation of build farms using Hydra.
If there was a runner that was a Hydra build farm, users could build their projects using Nix. Nix has advantages over the Docker approach for both users and the server maintainers.
Users would see much faster build times. This is because dependencies are cached, so a change in the codebase wouldn't require redownloading and building all the dependencies of the project. Furthermore, dependencies are cached globally across all builds, so even if this is the first time a build is running for a project, any dependencies that have ever been built on the server would be immediately available.
In addition, using nix provides repeatable builds so that the users can replicate the build happening on the server on their own machines.
This would also increase the efficiency of the Shared Runner so that more users could be served by fewer servers. The work of downloading and building dependencies would all be shared so that much less server-time is wasted building the same programs again and again.
Create a Hydra build farm as a Shared Runner.
Links / references
Nix package manager: https://nixos.org/nix/
Docker is a coarse-grained way of providing repeatable builds. The nix package manager is a more fine-grained way of accomplishing this that would allow for faster builds through sharing dependencies. Currently, to use nix in a Pipeline you need to a) install nix inside a Docker container b) download/build all your dependencies and c) build your project. By providing a Hydra build farm as a Shared Runners, we could simplify the process of setting up a nix based pipeline and make builds that use nix much more efficient, largely removing steps a) and b).
Users could simply have a flag in
.gitlab-ci.yml indicating that the Pipeline should execute
default.nix or some other nixfile.