gen-manifests
Regenerate nixidy manifests into themanifests/ directory.
Syntax
Behavior
- Builds nixidy environment package using Nix
- Outputs result to
manifests-result/symlink - Copies manifests to
manifests/directory - Makes manifests writable (
chmod -R u+w) - Removes ArgoCD self-management application
- Shows git diff statistics
Example
Output
Nixidy Integration
The command builds from the Nix flake:Directory Structure
Generated manifests are organized by component:Use Cases
- Apply nixidy module changes
- Regenerate after nix configuration updates
- Prepare manifests for manual inspection
- Update cluster after code changes
Related Commands
- watch-manifests - Auto-regenerate on changes
- fix-chart-hash - Fix helm chart hash mismatches
- nix-check - Validate nix expressions
watch-manifests
Watch nixidy modules for changes and automatically regenerate and apply manifests.Syntax
Behavior
- Monitors all
.nixfiles usingwatchexec - On any change:
- Regenerates manifests via
gen-manifests - Applies manifests to cluster via
kubectl apply
- Regenerates manifests via
- Restarts on crashes
- Runs until interrupted (Ctrl+C)
Example
Output
watchexec Configuration
The command uses:--exts nix: Only watch.nixfiles--restart: Kill and restart on new changes- Shell invocation: Ensures proper environment loading
Use Cases
- Rapid nixidy module development
- Immediate feedback on configuration changes
- Continuous integration testing
- Live cluster updates during development
Best Practices
Recommended workflow:- Run in dedicated terminal window
- Edit nixidy modules in your editor
- Save file to trigger regeneration
- Check cluster state with
kubectl get pods -A - Stop with Ctrl+C when done
Related Commands
- gen-manifests - One-time manifest generation
- debug-k8s - Check cluster state
fix-chart-hash
Automatically fix empty or mismatched Helm chart hashes in nixidy modules.Syntax
Behavior
- Attempts to build nixidy environment package
- If hash mismatch error occurs:
- Extracts correct hash from error message
- Finds
.nixfiles with empty or placeholderchartHash - Updates
chartHashwith correct value - Retries build
- Repeats until build succeeds or max iterations reached
- Maximum 10 iterations
Example
Output
Use Cases
- Adding new Helm charts to nixidy
- Updating chart versions
- Fixing hash mismatches after chart updates
- Bootstrapping new chart configurations
Hash Patterns
The script fixes these patterns:Error Handling
Platform Compatibility
The script uses
sed -i '' which is macOS-specific. On Linux, this should be sed -i.Workflow Example
Related Commands
- gen-manifests - Generate manifests after fixing
- nix-check - Validate nix syntax
Manifest Workflow
Development Cycle
Continuous Development
Validation Workflow
Best Practices
Version Control
- Commit nixidy modules to git
- Do NOT commit generated
manifests/directory - Use
manifests-result/symlink for reproducibility