Options for a package - clarification

Hi there,

When you search nixpkgs and options, I have noticed that some packages (I will use noisetorch as my example) have not only a package result but then also under options have something like programs.noisetorch.enable.

Q’s (non home-manager):

  • Is there a difference between installing the package or using programs.noisetorch.enable = true;?
  • Or: does programs.noisetorch.enable = true; do additional configuration?
  • Is it one or the other, or both when adding the package?

In the context of home-manager, I am aware that enabling it there also installs the package.

Thank you.

1 Like

Yes, enabling usually takes care of the install, be it in home-manager or NixOS.
Enabling often adds further things, such as starting up a service. For details please refer to the NixOS manual and the option search, as the details depend on the individual module.


Thanks! I will default to “enable”, and only add the package if I ever run into some scenario where it appears to be needed.