Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Nix Toolchain

Lix vs CppNix

This repo uses Lix (a Nix fork) on most platforms for its improved error messages and performance. The exception is x86_64-darwin (Intel Macs), where Lix dropped support – those machines use the upstream CppNix package instead.

The selection logic lives in modules/common/nix-core.nix:

nix.package =
  if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
  then pkgs.nix
  else pkgs.lix;

Experimental Features

The flake enables nix-command and flakes experimental features globally. These are required for nix build, nix develop, and flake-based workflows.

Binary Caches

Three substituters are configured to speed up builds:

CachePurpose
cache.nixos.orgOfficial NixOS cache
nix-community.cachix.orgCommunity packages (home-manager, etc.)
cache.numtide.comnumtide packages (system-manager)

Garbage Collection

Automatic weekly GC deletes store paths older than 7 days:

nix.gc = {
  automatic = true;
  options = "--delete-older-than 7d";
};

Manual cleanup is available via mise run nix:clean [window] (prune old system generations for this config) and mise run nix:gc (aggressive store-wide garbage collection).