Hello,
When I recently installed nixd as language server I noticed it pulls in Nix version 2.16 as a dependency, although the nix version on my system is 2.18. The nixpkgs version should be the same - unstable. So I went and checked the declaration in nixpkgs, but it does seem to use just the default Nix version.
Then I noticed that there is a third version installed on my system - Nix 2.15. This one is pulled in as a dependency of nixos-option. I don’t know what that package does, was not able to find documentation nor could I get it to print any useful information.
It would be nice to have packages use the same dependencies if possible. In this case I would really like to have nixd use the default Nix version, and either get rid of nixos-option or make it use the same version as well.
I didn’t need any of the other installer tools, but you can add those back as well if you need them (things like nixos-install, nixos-generate-config, etc).
You can have a look also at nil as a nix language server.
It doesn’t link to nix and so doesn’t depend on a specific version of nix.
It does not have exactly the same feature set though, it doesn’t do some of the things that nixd does (and maybe does some that nixd doesn’t), so up to you to decide which one suits your use case best.
Ok thanks for the hint. When I was looking for an language server I though linking against Nix was a good thing as it may ensure closer compatibility. But maybe I’ll try out nil as well. Are there any fundamental advantages/disadvantages to nil?