Nix
A CLI, package manager, and programming language
We recommend starting with the Nix quick start and consulting concept docs primarily for clarification. Feel free to click x to the right to disable this notification on all concept docs.
Nix can be a somewhat confusing term because it refers to multiple things:
- The pure and functional programming language
- The Nix CLI
- The overall Nix package management system
All of these are closely interrelated and should be thought of as a single tool. In this document, we’ll go over each of these three aspects of Nix.
The Nix project is fully open source and largely developed within the NixOS
organization on GitHub.
It’s licensed under LGPL 2.1, which is generally quite permissive regarding commercial use.
We at Determinate Systems have actively contributed to Nix as an open source project in the past—alongside countless talented individuals—and will continue to do so as part of our
The Nix CLI
There are two different Nix CLIs currently active:
- The unified Nix CLI is currently experimental but, from the standpoint of
Determinate Systems , recommended for using Nix. It wraps all Nix functionality into a singlenix
executable and supports flakes - The original Nix CLI, which is currently standard but, from the standpoint of
Determinate Systems , not recommended for using Nix.
The unified CLI
The unified CLI is a still-experimental way of using Nix that involves just one executable called nix
.
All Nix functionality is wrapped into this tool, including commands like nix build
for building packages instead of the old nix-build
tool, nix develop
for activating Nix development environments instead of the old nix-shell
tool, nix store
for managing the Nix store instead of the old nix-store
tool, and more.
Because the unified CLI isn’t yet official, it needs to be explicitly enabled in your Nix configuration by adding nix-command
to your experimental-features
list.
We won’t cover setting up the unified CLI here because the Determinate Nix Installer both installs it and enables it in your Nix configuration.
The original CLI
The original CLI for Nix is still the official CLI but, as we mention above, not recommended for new Nix users for two reasons:
- It’s incompatible with Nix flakes as it was created before the inception of flakes.
- It presents significant cognitive overhead in comparison with the unified CLI because it requires you to learn a wide variety of CLI tools, including
nix-build
for building packages,nix-shell
for Nix development environments,nix-store
for managing the Nix store, and several more.
The Determinate Nix Installer enables the unified CLI by default, but leaves the tools from the original CLI accessible.