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

Templates

Initialize a new directory with the template that matches how Pi will be used:

nix flake init --template github:mateusdcc/nixpi#standalone
TemplateCommand suffixUse it for
Standalone#standaloneA configured nix run .# agent package.
Home Manager#home-managerA home.nix fragment for a user installation.
devShell#devshellA repository development environment, especially with direnv.
learning#learningLegacy compatibility only. Use deep-comprehension-engine for new learning environments.

Standalone

After initializing, set the target system and provider in flake.nix, export the required key, and run:

nix run .#

Home Manager

The template supplies a home.nix module. Add it to your Home Manager module list after importing nixpi.homeModules.default:

modules = [
  inputs.nixpi.homeModules.default
  ./home.nix
];

devShell

Use this for a repository-specific agent and pair it with the direnv guide. Enter it manually with:

nix develop

The template makes Pi, Git, and ripgrep available in the shell. Change programs.pi in the template rather than maintaining a separate imperative setup script.