Rechercher

PythonReactSEOPDF
GitHub Skill

testing

Test changes using module-graph and build commands

DaRacci☆ 17 Étoiles du dépôt0 Forks du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

Voir la source ↗Guides

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
    

Exemples

Consultez les exemples du dépôt source.

Voir la source ↗

Historique source

Date d’indexation
2026-01-20
Mise à jour de l’index
2026-01-26
Branch
main

Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.

GitHub ↗

chat Comments (0)

chat_bubble_outline

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