Elixir_ls in Neovim on NixOS?

With nvim-lspconfig, the instructions for setting up elixir-ls say:

unzip elixir-ls.zip -d /path/to/elixir-ls
# Unix
chmod +x /path/to/elixir-ls/language_server.sh

By default, elixir-ls doesn’t have a cmd set. This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set cmd to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls.

require'lspconfig'.elixirls.setup{
    -- Unix
    cmd = { "/path/to/elixir-ls/language_server.sh" };
    -- Windows
    cmd = { "/path/to/elixir-ls/language_server.bat" };
    ...
}

Installing the elixir-ls package via nixpkgs, finding it and the path to language_server.sh within it on the nix store, and pasting that path on the config does not work. Can’t run chmod +x /path/to/elixir-ls/language_server.sh on the nix store, either. I tried manually downloading and extracting another copy of it on another random folder, following the instructions for that one and passing that path to the config instead, and it still doesn’t work ^^;

I am definitelty not savvy enough to figure out how to go about this… does anyone know an easy way to set up elixir-ls for Neovim on NixOS?

nix-shell -p elixir-ls should put the program in PATH

I didn’t need to do any of that stuff. You can just use the elixir-ls package (install it locally or in a dev environment or whatever), and just do this for lspconfig:

require'lspconfig'.elixirls.setup {
    cmd = { 'elixir-ls' }
}

This above works for me.