Make nixd module completion to work anywhere (with Flakes)

from blog kokada, | ↗ original
If you want the TL;DR, go to the bottom of the post (search for "final result"). I recently switched from nil to nixd as my LSP of choice for Nix. I was curious in nixd for a long time since the fact that it can eval Nix code means it can offer much more powerful completion than the nil's static analysis, however it used to be difficult to setup....