Universal declarative way to install node, flatpack, hex, snap, python, ruby, etc. packages

I am trying to build the configuration where I can install none nix packages declaratively. What is the way to go, can I declare them declaratively or there are better ways with the help of wrappers or something else?

I have found the answer on a forum:

environment.systemPackages = with pkgs; [
  ...

  nodePackages.typescript;
]

But I cannot find the concept documentation on the topic. Also, “nodePackages” does not appear when I search it in Modules or Options on the NixOS site.

1 Like

Do you mean you want to install all packages declaratively? Or with a command?

Declaratively, something like “nodePackages.typescript;” in a nix configuration file.