What I do
After making changes to any .nix files in this repository, run nh os build to validate the configuration evaluates and builds without errors.
How to run
bash
git add . nh os build
Run from the repo root (/home/vidhanio/Projects/vidhanix). The build typically takes 10–60 seconds.
Important: Always stage relevant files with git add before running nh os build. The build uses staged files, so unstaged changes won't be included. Usually git add . is appropriate, but you can stage specific files/directories if needed (e.g., git add modules/programs/neovim/).
Interpreting output
- •Success: output ends with
✔ nixos-system-...and aSIZE/DIFFsummary. No action needed. - •Evaluation error (
error: ...): a Nix expression is invalid. Read the error trace to find the offending file and line, fix it, and re-run. - •Missing path (
path '...' does not exist): a relative path to a secret or file is wrong. Count the directory depth of the referencing.nixfile relative to the repo root and correct the../prefix count so it resolves tosecrets/<name>.ageat the repo root. - •Type/option error (
The option ... does not exist/is not of type): a Home Manager or NixOS option is misused. Check the module definition and fix the value or type.
When to use
Use this skill any time .nix files are created or modified — especially when touching:
- •
age.secrets.*.filepaths - •New module options or
configblocks - •Package definitions or
perSystemexpressions - •Any file under
modules/
Always run before declaring a task complete.