From 1e75db5f15eff1efeccf8bf17c4a7916189d7943 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Sat, 7 Jun 2025 12:11:49 +0200 Subject: [PATCH] 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. --- instruction.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instruction.md b/instruction.md index 37674ea..8fe4345 100644 --- a/instruction.md +++ b/instruction.md @@ -68,8 +68,9 @@ Home-lab/ ### Before Any NixOS Changes 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 -3. **Test build**: `nix build .#nixosConfigurations..config.system.build.toplevel` +2. **Stage changes in git**: `git add .` (ensures Nix can access all files) +3. **Check current state**: `nix flake check` and verify system health +4. **Test build**: `nix build .#nixosConfigurations..config.system.build.toplevel` ### Configuration Best Practices - **Machine-specific configs**: Keep in `machines//` directory