-
First, add
asdfto the Nix configuration with the package namedasdf-vm. Add the following line to yourconfiguration.nixfile:environment.systemPackages = with pkgs; [ asdf-vm ];
-
Next, add the following lines to your
.bashrcfile:. "$HOME/.nix-profile/share/asdf-vm/asdf.sh" . "$HOME/.nix-profile/share/bash-completion/completions/asdf.bash"
These lines will load
asdfinto your shell. -
Reload your
.bashrcor open a new terminal to apply the changes. -
Verify that
asdfis 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.
for me, i had to load bashcompinit on zsh to make it work: