-
First, add
asdf
to the Nix configuration with the package namedasdf-vm
. Add the following line to yourconfiguration.nix
file:environment.systemPackages = with pkgs; [ asdf-vm ];
-
Next, add the following lines to your
.bashrc
file:. "$HOME/.nix-profile/share/asdf-vm/asdf.sh" . "$HOME/.nix-profile/share/bash-completion/completions/asdf.bash"
These lines will load
asdf
into your shell. -
Reload your
.bashrc
or open a new terminal to apply the changes. -
Verify that
asdf
is properly installed by running the following command:asdf --version
This should output the version number of
asdf
.
That's it! Now you can use asdf
with Nix.
Thanks for this, It's really useful.
For anyone that's using fish, do this on step 2: