'programs.chromium.enable = true' does not install chromium

Continuing from "programs.foo.enable = true" vs "systemPackages=[foo]" is confusing

I thought I could install Chromium by using the existing programs.chromium.enable = true option, but that’s not the case. The description of that option does hint that it doesn’t install Chromium, but this is an unintuitive departure from other programs options that do install the package of the same name.

This may make things confusing for a new user.

There would be more confusion if programs.chromium.enable = true would install chromium.
Because there are three chromiums and one google-chrome.
programs.chromium.* rule settings for all of them at once.

I’d prefer to remove programs.chromium. and add chromium.withPackages (https://github.com/NixOS/nixpkgs/issues/76863), but it is not the only possible way to simplify the settings

1 Like

As someone who is also new, it is a little unintuitive.

If it was named chromiumPolicies or something it would be a bit more obvious. Although, the description does describe what it does.

2 Likes

Agreed. The enable = true pattern should be reserved for programs or services that get installed. @volth is going in the right direction by making the package itself configurable.

2 Likes