No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-29 12:43:42 +02:00
examples en 2026-09-29 11:11:54 +02:00
presentation langs 2026-09-29 12:43:42 +02:00
.gitignore build: add flake-parts dev shell with presenterm 2026-09-28 21:05:54 +02:00
alejandra.toml build: add flake-parts dev shell with presenterm 2026-09-28 21:05:54 +02:00
flake.lock build: add flake-parts dev shell with presenterm 2026-09-28 21:05:54 +02:00
flake.nix langs 2026-09-29 12:43:42 +02:00
README.md docs: describe the repo as the presentation 2026-09-28 21:05:54 +02:00

Why Nix?

This repository is a presentation: a short talk on why we should use Nix dev shells for project development. The slides are markdown files for presenterm.

The talk covers:

  • pinning project dependencies (Node.js, Python, Postgres) with a flake.nix
  • a shell hook that greets you with the tool versions
  • the shell as the documentation of the environment, instead of README setup steps
  • downloading an arbitrary zip from the internet, pinned by hash
  • a shell script written in the flake that brings its own dependencies
  • how the Nix store works, and why per-project shells keep your system clean
  • running any package once with nix run nixpkgs#<package>
  • why a dev shell does not replace Docker

Run it

You only need Nix with flakes enabled. The dev shell of this repository is also the example the talk builds up to, and it ships presenterm:

nix develop
presenterm presentation/en.md

Add -x to allow running the +exec snippets live from the slides:

presenterm -x presentation/en.md

Layout

.
+- flake.nix             the full example shell (plus presenterm)
+- examples/
|  +- 01-versions/       pinned Node.js, Python and Postgres
|  +- 02-shell-hook/     the same shell, printing versions on entry
|  +- 03-fetch-zip/      a zip from the internet, pinned by hash
|  +- 04-shell-script/   a script that carries its own dependencies
+- presentation/
   +- en.md              English slides

Every flake is written with flake-parts, so one definition covers Linux and macOS on both x86_64 and aarch64.

Each example is a standalone flake you can enter directly:

nix develop ./examples/02-shell-hook