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

Getting Started

Clone

git clone https://github.com/arunoruto/flake ~/.config/flake

If you clone elsewhere, set the FLAKE environment variable:

export FLAKE=/path/to/flake

Commands throughout this guide assume FLAKE points to your flake directory.

NixOS

First-time install:

sudo nixos-rebuild switch --flake ~/.config/flake#<device-name> --accept-flake-config

After initial setup, use nh for convenience (see Daily Usage):

nh os switch ~/.config/flake#<device-name>

Darwin (macOS)

sudo nix run nix-darwin/nix-darwin-<version>#darwin-rebuild -- switch

Replace <version> with the nix-darwin release (e.g., 25.11).

Home Manager

On NixOS

home-manager switch --flake ~/.config/flake#<username> --accept-flake-config

Standalone (non-NixOS)

nix --experimental-features 'nix-command flakes' --accept-flake-config run nixpkgs#home-manager -- switch --flake ~/.config/flake#<username>

Shells like zsh require quoting: --flake './#<username>'

Directory layout

Your host config lives in systems/<arch>/<host>/. Home Manager profiles are in homes/<username>/. Add new ones following the existing patterns.