Search

PythonReactSEOPDF
GitHub Skill

testing

Test changes using module-graph and build commands

DaRacci☆ 17 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

Testing

Critical Requirement

After making changes you MUST ALWAYS evaluate and test your changes.

Finding Affected Configurations

Use the module-graph script to determine which hosts and homes are affected by your changes:

./flake/dev/scripts/module-graph.nu

This outputs JSON showing which configurations use each file:

{
  "file": "modules/nixos/services/tailscale.nix",
  "hosts": ["nixdev", "nixmi", "nixcloud"],
  "homes": []
}

Minimum Test Requirements

Based on the module-graph output, you must test at least one of each type affected:

Changed File Affects Minimum Test
Hosts only Build one affected host
Homes only Build one affected home
Both hosts and homes Build one host AND one home

Test Commands

Test a host configuration
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel
Test a home configuration
nix build .#homeConfigurations."<user>@<host>".activationPackage
Run full flake check
nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"

Testing Workflow Example

  1. Make changes to modules/nixos/services/tailscale.nix

  2. Run module-graph to find affected configs:

    ./flake/dev/scripts/module-graph.nu | jq '.[] | select(.file | contains("tailscale"))'
    
  3. Pick one affected host and build:

    nix build .#nixosConfigurations.nixdev.config.system.build.toplevel
    
  4. If the change also affects homes, build one:

    nix build .#homeConfigurations."racci@nixmi".activationPackage
    
  5. Format your changes:

    nix fmt modules/nixos/services/tailscale.nix
    

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-20
Index updated
2026-01-26
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!