The reason it doesn’t work when installed through Nix is because it’s not packaged as a node application. I haven’t bothered upstreaming this, but this works (requires regenerating node packages though): https://github.com/infinisil/nixpkgs/commit/e3d5e5355c8c37fd14e64ba0ac42fd099bee90c4
See also vimPlugins: fix coc-markdownlint and coc-vimlsp by malob · Pull Request #105174 · NixOS/nixpkgs · GitHub which fixed this for some other coc plugins