Nix 101 Course / Section 1: Getting started: install Nix and score your first wins
Premium

1.5 Installing tools to keep with nix profile

Lesson 5 of 68 · 7:57

placeholder thumbnail

Sign in, then buy this course to watch

Free account · no credit card needed

About this lesson

A nix shell is gone the moment you close the terminal. When a tool should stay, like an editor or a language server, nix profile is how you install packages for your user with Nix. This lesson covers installing, listing, removing and upgrading packages, plus the generation mechanism that lets you undo any change with a single command.

In this video

  • Installing, listing and removing packages with nix profile
  • Why which hello does not show a store path: the symlink construction behind your profile, and why two users on one machine never clash
  • Undoing a remove with nix profile rollback, and what "switching from version 35 to 34" means
  • Profile generations explained with the original diagram from Eelco Dolstra's PhD thesis, and where they live on your disk
  • Upgrading everything, or single packages, once nixpkgs has moved on

After this lesson

You can install, remove and upgrade user-level tools with Nix, and you can step back through profile generations whenever a change turns out to be a mistake.