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

Install Nix the Survivable Way

~12 min · nix, installation, determinate-systems

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

There are two installers for Nix on macOS: the official one and the Determinate Systems installer. Use the Determinate Systems installer. It's the same Nix, but with two practical differences that matter on a Mac.

First, the Determinate Systems installer survives macOS major upgrades. The official installer relies on a synthetic /nix mount that macOS sometimes obliterates during version bumps; you wake up to a broken Nix install. Determinate's installer puts /nix on its own APFS volume that macOS won't touch.

Second, it has a clean uninstaller. Run /nix/nix-installer uninstall and your Mac is back to its pre-Nix state. The official installer's removal process is multi-step and easy to botch.

After install, restart your terminal (or source the new shell init), and verify with nix --version. You'll get Nix 2.x with flakes and the new nix command both enabled by default — that's the modern setup. If you ever see docs that say 'enable flakes by editing nix.conf', you're reading old docs; Determinate's installer flips both flags for you.

Code

Install Nix (Determinate Systems — recommended)·bash
# Install
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

# Restart terminal, then verify
nix --version
# nix (Nix) 2.x.x

# Confirm flakes + nix command are enabled
nix flake --help     # should NOT say 'experimental feature'
Uninstall cleanly (when you need to)·bash
# Determinate's installer ships its own uninstaller
/nix/nix-installer uninstall

# Confirms what it'll remove, asks for permission, then cleanly reverts.
# After this completes, your Mac is back to pre-Nix state.

External links

Exercise

Install Nix via the Determinate Systems installer. Run 'nix --version' to confirm. Then run 'nix shell nixpkgs#cowsay' — when the prompt returns, type 'cowsay hello' and watch a cow speak. Exit the shell ('exit' or Ctrl-D); cowsay vanishes from your PATH. That ephemeral-shell trick is Nix's most addictive feature.

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.