Nix 101 Course / Section 3: Dev shells: the productivity unlock
Premium

3.1 Why dev shells beat system-wide installs and Docker

Lesson 18 of 68 · 9:23

placeholder thumbnail

Sign in, then buy this course to watch

Free account · no credit card needed

About this lesson

Setting up a project toolchain is often half a day of hunting dependencies out of a README, and one system update later it is broken again. This lesson compares the classic answers (installing everything system-wide with sudo, or building a Docker image) with a Nix dev shell, using the real tmux source tree as the running example. It is the case for why a reproducible development environment defined with nix-shell or nix develop changes how teams onboard.

In this video

  • Reading the tmux README the hard way: dependencies scattered across the file, different package names on every distro
  • Writing a Dockerfile for the toolchain, and where it starts to hurt: two separate worlds, editors that cannot see your dependencies, and full image rebuilds after tiny changes
  • The list of problems shared by both legacy approaches, from sudo everywhere to binaries that only match one distribution
  • What a Nix dev shell does differently: one command for every colleague, tools that vanish when you exit, no container wall between your editor and your dependencies
  • Why the same shell definition can serve Linux and macOS

After this lesson

You can explain, with concrete arguments, why your team should stop maintaining setup wikis and Docker dev images, and you know exactly what the rest of this chapter will replace them with.

Links: