Update testing methodology: Add git staging before flake check

This ensures Nix can access all files during testing, preventing
path not found errors when testing configurations.
This commit is contained in:
Geir Okkenhaug Jerstad 2025-06-07 12:11:49 +02:00
parent 9837d82199
commit 1e75db5f15

View file

@ -68,8 +68,9 @@ Home-lab/
### Before Any NixOS Changes ### Before Any NixOS Changes
1. **Use Context7**: `bb7_resolve-library-id nixos``bb7_get-library-docs` with resolved ID 1. **Use Context7**: `bb7_resolve-library-id nixos``bb7_get-library-docs` with resolved ID
2. **Check current state**: `nix flake check` and verify system health 2. **Stage changes in git**: `git add .` (ensures Nix can access all files)
3. **Test build**: `nix build .#nixosConfigurations.<machine>.config.system.build.toplevel` 3. **Check current state**: `nix flake check` and verify system health
4. **Test build**: `nix build .#nixosConfigurations.<machine>.config.system.build.toplevel`
### Configuration Best Practices ### Configuration Best Practices
- **Machine-specific configs**: Keep in `machines/<name>/` directory - **Machine-specific configs**: Keep in `machines/<name>/` directory