Quick reference for agents working on this Nix-based configuration repository. Load skills as needed for detailed guidance on specific tasks.
These rules take absolute precedence over any other considerations. Violating these rules is unacceptable under any circumstances.
RULE: Documentation in docs/ MUST be updated simultaneously with code changes.
STATUS: Non-negotiable. No exceptions.
VERIFICATION: Always check docs/ before completing any task.
Process:
- Make code change in relevant
.nixfile - IMMEDIATELY update corresponding documentation in
docs/ - Verify documentation accurately reflects new behavior
- Only then proceed to commit
Example:
If you modify: modules/nixos/services/tailscale.nix
You MUST update: docs/modules/nixos/services/tailscale.md
RULE: All code MUST be formatted with nix fmt before completeting any task.
STATUS: Non-negotiable. No exceptions.
VERIFICATION: Run `nix fmt .` before finalizing any changes.
RULE: All affected configurations MUST be tested before completeling any task.
STATUS: Non-negotiable. No exceptions.
VERIFICATION: Reference the `test` agent and `testing` skill for guidance on identifying affected configurations and running appropriate tests.
| Command | Purpose |
|---|---|
nix build .#nixosConfigurations.<host>.config.system.build.toplevel |
Build host |
nix build .#homeConfigurations."<user>@<host>".activationPackage |
Build home |
nix fmt |
Format code |
nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root" |
Check flake |
This repository uses devenv. You must provide the override for nix flake check and nix develop:
--override-input devenv-root "file+file://$PWD/.devenv/root"Before testing, determine what your changes affect:
./flake/dev/scripts/module-graph.nuflake.nix # Top-level flake
modules/ # Reusable modules (nixos/, home-manager/)
lib/ # Shared Nix functions
hosts/ # Per-machine NixOS configurations
home/ # User Home-Manager configurations
pkgs/ # Custom packages
overlays/ # Nixpkgs overlays
For detailed information on any topic, load the corresponding skill.