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

§12b. Garbage collection and space budgets

planarian @ a924e09 · Spec v4.6 · snapshot main · all versions

Protected set per I3, including in-flight candidates (via their GC-root symlinks) and every txn/<txn>/base.nix of a non-terminal transaction. services.planarian.gc.retainAllGenerations (default false) protects every generation: a full history kept for export or to go back to any of them; other store garbage is still collected, and the budgets below are reported, not enforced. Policy: keep last 10 generations and 10 snapshots and space budgets (default: generations ≤ 20% of the Nix store’s filesystem, snapshots ≤ 10% of their volume); whichever bound is hit first collects oldest-first down to the other. If the protected set alone exceeds a budget, CollectGarbage collects everything unprotected, reports BudgetUnsatisfiable with the shortfall, and never touches the protected set; the budget is then a target, not a guarantee, and the console says so. CollectGarbage is Runtime. Budgets are user settings, not manifest options.