NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.32k stars 14.29k forks source link

Add programs.chromium.package back? #344311

Open SpiderUnderUrBed opened 2 months ago

SpiderUnderUrBed commented 2 months ago

Hello, I looked at a reddit post and several other posts and at one point in time, programs.chromium.package was a thing, why was it removed? and can it be added back? Im sure it was useful for other people but again I dont know why it was removed. Here is what I tried to use it for:

    chromium = {
        enable = true;
        package = pkgs.brave;
        extensions = [
          { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }
          { id = "nngceckbapebfimnlniiiahkandclblb"; }
          { id = "mnjggcdmjocbbbhaepdhchncahnbgone"; }
          { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; }
       ];
    };

And i got the error:

       error: The option `programs.chromium.package' does not exist. Definition values:
       - In `/nix/store/b7bnrhlwlcq7x76hj10akkshp9fylgyj-source/configuration.nix': <derivation brave-1.70.117>
SpiderUnderUrBed commented 2 months ago

I recognize it was removed intentionally: https://github.com/NixOS/nixpkgs/commit/2c8c689cd7643f326e2782d8d8b28572d946816a

I will think about whether or not I want this issue to be up

SpiderUnderUrBed commented 2 months ago

A few things, I think that this issue is worthy of being kept up so when it comes time to re-add programs.chromium.package someone will remember or be inclined to work towards it, however, I think that some things need to be considered and maybe a sightly diffrent implimentation is needed:

-Should this be the same for programs.firefox? -Fix the documentation to mention this: https://search.nixos.org/options?channel=24.05&show=programs.chromium.extensions&from=0&size=50&sort=relevance&type=packages&query=programs.chromium -And more importantly, to re-impliment packages, by default what you set in programs.chromium should apply to all chromium based browsers, I agree with this, however I think that you should be able to specify what browser you want to limit installing x extentions too, so again, by default it will apply to all browsers unless you specify the browser with programs.chromium.packages, then something like this should be made for firefox, and maybe rename the packages thing so people know its being limited to these browsers, I think people will find it useful