Remote Execution with Rules_nixpkgs: Design and Deployment
summary
rules_nixpkgs integrates Nix into Bazel but breaks remote execution; this work implements a solution combining remote Nix execution with Bazel remote workers and an NFS-shared Nix store so remote actions find nixpkgs outputs. Deployment uses build‑plan hashing, link options to avoid duplicating blobs, patched Nix evaluation to reduce repeated calls, and BuildBuddy for execution. On a large mono‑repo, cold CI runs (80m) drop to 19m with populated caches; NFS and cache tuning still require more work.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 5:49Motivation for remote execution
- 10:04Problem statement and design
- 13:58Architecture and workflow
- 16:25Codebase preparations
- 20:24Infrastructure for Nix
- 21:07Benchmarking results
- 23:56Network transfer and caching
- 26:30Validation and achievements
- 27:56Future work
- 30:50Q&A
related talks
34mNix for developers and ops
59mReproducable environments using nix
58mFunctional Infrastructure With Nix - Part 1 of 2
41mFrom Bash to Nix
48mFrom Zero to Application Delivery with NixOS
40mBut It Builds on My Machine!: Building Deterministic OCI Images With Nix
36m2 Hours to 10 Minutes: Building Rust Monorepos at Scale with Bazel RBE
41mCloud Native Nix!
