Nix vs asdf for Elixir version management

I have played around a bit and come to this shell.nix for Elixir 1.7.0-rc.1 using Erlang 21 from nixpkgs:

I’ve passed rebar from beam.packages.erlangR21 to the Elixir builder to avoid depending on Erlang 19—on which rebar depends otherwise.

This seems very promising. My next step is trying to setup a full environment for Nerves.