I don't think I would alone in saying that your JavaScript example is much easier to read than the Nix variant. It reads very cleanly, it's obvious what's a function and what are arguments to the function, and you can easily read it left to right. You have to track the parentheses a long way to see that builtins.filter takes two arguments, and it's very non-obvious what the first argument even is. It's much harder to read than `Object.keys(licenses).filter(...)`, IMHO.
Maybe there's no inherent cosmic superiority to the C/C++/Java style syntax of JavaScript/TypeScript compared to the Haskell-style syntax of Nix, but in reality, most programmers can read it easily. Which is not something that can be said for Nix.
On the `nix.thunk` thing, that was for the code that was automatically transpiled from Nix while maintaining the exact semantics, so yeah, it looks ugly. But the article has examples of what it would look like hand-written, and it looks just fine.