Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox allow overriding with custom policy.json in distribution #247

Open
toastal opened this issue Dec 30, 2020 · 1 comment
Open

Firefox allow overriding with custom policy.json in distribution #247

toastal opened this issue Dec 30, 2020 · 1 comment

Comments

@toastal
Copy link

toastal commented Dec 30, 2020

Because the store is immutable (therefore the file in /distribution can't be modified)/and these bins don't appear to read from /etc/mozilla/firefox/policies, it would be ideal to have a way to inject some custom settings.

A web search did not reveal any clear or satisfactory ways to accomplish this all saying you need to build from source (which failed for me), or set the store to allow writing, or installing the bin from outside of Nix, or trying to inject the script into /run/user and then be picked up by Firefox after about:config flag is checked and browser restarted. All of these seem bad given Nix likes to have declarative config files.

@nbp
Copy link
Collaborator

nbp commented Mar 8, 2021

Currently the policies.json is inherited from https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox-bin/default.nix#L179

It is used as follow:
https://github.com/mozilla/nixpkgs-mozilla/blob/master/firefox-overlay.nix#L142-L154

Which reuses the building expression from Nixpkgs, and replaces the source binary.

While this can be done without modifying Nixpkgs, I will highly suggest making it possible within Nixpkgs, such that this overlay can benefit from it as well. Otherwise, you might be able to a similar thing with overrideAttrs without modifying nor Nixpkgs nor this overlay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants