NixOS: Sandbox and Reproducible Builds

Categories: NixOS Nix Builds Containers

We have gone through a lot when configuring our computers with a language, with an editor, and maybe even setting up Git. For every project, though, we may need a different set of tools. In one, you may require Java 17 with a particular version of Kotlin. Another will require an npm of a specific version. You could use something like SDKMan for Java or a node version manager for Node. The problem is that you must install it and ensure you do it correctly for every project. The global installation won’t cut it; the more complex your project dependencies, the more tedious it will get. Nix provides consistent installation of tools so that it gets it right every time and for every project. It manages all project dependencies so you can consistently build your project.

In this presentation, we will cover:

  • What NixOS is, and why it is useful?

  • How is it different from using Docker or any other container environment?

  • How to install

  • What is the actual operating system?

  • How to use nix-shell?

  • How to create an environment

  • Using niv

  • Finding and using flakes

  • Programming NixOS

  • Using NixOS with Docker

  • How dependencies are cached

  • How to integrate it with your project

  • What does NixOS mean for CI/CD environments.