A small hint for all the #Elixir users out there.
I don't know about you, but I always cringed at how dirty mix is when it comes to installing third party toolchain dependencies.
Twelve years into using it, I learned that you can actually localise third-party installations!
Here's a snippet from my #direnv.
```sh
mkdir -p .nix-mix .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-mix
[ -z "$(ls -A .nix-mix)" ] && mix local.hex
[ -z "$(ls -A .nix-mix)" ] && mix local.rebar
```
This can make your #Nix builds pure without faking HOME!
@jonn neat idea, but I don’t think the tests actually work right. If it installs Hex, it won’t be able to install rebar, right? Might be better to use `mix local.hex —force —if-missing; mix local.rebar —force —if-missing ` instead.
@IslandUsurper ok, next time I sh*t-talk #ChatGPT I should remember that I'm as stupid 😆
@jonn I believe you can use `direnv_layout_dir` in your direnv script to get an env-specific directory instead of PWD