pub fn wait_for_changes(flake_dir: &str) -> Result<PathBuf>Expand description
Wait for filesystem changes in the given flake directory.
Watches flake.nix, flake.lock, and all .nix files recursively.
Returns the path of the file that triggered the change, or None on error/timeout.
Uses the notify crate for native filesystem events (FSEvents on macOS,
inotify on Linux) instead of polling. Changes are debounced by 500ms to
avoid redundant rebuilds from rapid file saves.