Experience Base58's

Nix: Reproducibility at Scale

nix is an up-and-coming package manager with an emphasis on reproducibility. Learn how it works, and how to use it in your set up in this Base58 class.

Nix: Reproducibility at Scale

Why Nix

How often do you find yourself in a situation where something builds and works on your machine, but doesn’t build on CI or fails catastrophically in production?

In many cases, those problems are a symptom of something most developers face: lack of reproducibility. Your code depends on an environment variable at compile time, or significantly changes behavior with different versions of a dependency.

Such problems are usually hard to diagnose and even harder to fix. However, there is a tool that can help you solve those issues – Nix.

Nix (https://nixos.org/nix/) consists of a package manager and a language to describe packages for the said manager. It features reproducible builds, cross-distro and -platform compatibility, binary caching, as well as a large collection of packages maintained by thousands of contributors.

What We’ll Cover

  • nix, the ecosystem
  • nix, the language
  • flakes
  • modules
  • devshell
  • debugging nix
  • NixOS configuration
  • nix-bitcoin modules

What to know before class (pre-requisites)

Nix is a package manager that runs on the command line. Being familiar with the terminal, installing software via package managers, and functional/lazily evaluated languages will be a big leg up in getting the most out of this class.

Bonus points if you have a software project that you want to package up, or a machine that you want to try running NixOS on would be super helpful.

Would highly recommend checking out Determinate Systems’ Zero to Nix guide, or the nix foundations’ Nix Pills before class.