# nix-direnv's _nix_clean_old_gcroots nukes ALL flake-profile* on each
# `use flake` call, invalidating sibling shells' caches. No-op it here.
# To purge stale profiles manually: rm .direnv/flake-profile-* then direnv reload
# _nix_clean_old_gcroots() { :; }

# Or

# Only clean profiles older than N days instead of all-or-nothing
_nix_clean_old_gcroots() {
    local layout_dir=$1
    rm -rf "$layout_dir/flake-inputs/"
    find "$layout_dir" -maxdepth 1 -name 'flake-profile*' -mtime +14 -delete
}

use flake dev#rust
