C.W.K.
Stream
Lesson 05 of 05 · published

Nix Wisdom — Climb the Curve Productively

~11 min · nix, wisdom, learning

Level 0Newbie
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

Nix is the package manager most likely to make you give up. These rules of thumb keep you productive while the rest of the language and ecosystem sinks in.

Start with nix shell. Don't try to install Nix and immediately replace your whole dev workflow. Use nix shell for try-this-tool experiments. Once that feels natural, write a flake for a real project. Once that feels natural, look at nix-darwin.

Skip channels — go straight to flakes. The older 'channels' workflow (nix-channel --add) is what most legacy tutorials use, and it's full of footguns around reproducibility. The modern flake-based workflow is what new code uses; learn it first.

Use search.nixos.org/packages. The CLI nix search works, but the web UI is faster and shows you the exact attribute name to use in a flake.

When you write your first flake, copy a working starter. The MikaelFangel/nixos-config, srid/haskell-flake, or numtide/devshell starters give you a flake that works on day one. Iterate from a working starter, never from a blank file.

Embrace the learning budget. Nix isn't 'I'll learn it on a quiet afternoon'. It's 'I'll spend 20 minutes a day for two weeks'. The other package managers in this quest you can learn during a coffee break; Nix you learn during a season.

Code

Bootstrapping habit — try then commit·bash
# Day 1: just try things
nix shell nixpkgs#ripgrep   # use it for an hour, then exit

# Day 5: write a one-tool flake
# (in a new repo's root)
echo '{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  outputs = { self, nixpkgs }: {
    devShells.aarch64-darwin.default =
      (import nixpkgs { system = "aarch64-darwin"; }).mkShell {
        packages = with (import nixpkgs { system = "aarch64-darwin"; }); [ ripgrep ];
      };
  };
}' > flake.nix
nix develop

# Day 30: nix-darwin manages your whole Mac

External links

Exercise

Make Nix part of one specific habit for the next two weeks. Pick ONE: (a) use 'nix shell' instead of installing experimental tools globally, (b) write a flake.nix for one of your projects, or (c) work through Zero to Nix. Don't try all three. Pick one, do it daily, and Nix becomes a tool you trust instead of a tool you avoid.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.