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: wrapper updating an addon perserves addon settings #106000
Conversation
7999eb0
to
e669d81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think to would be nice to add an fixedExtid option (or something like it)
Please make sure this pull request is tested properly before merging. |
be19dba
to
0efbd42
Compare
Does the wrapper work with |
Please rebase on the master rather than merging it. |
If add-ons are removed and reinstalled, the settings are cleared. Is this an expected behavior?
Expected: |
Doesn't work with let
pkgs = import <nixpkgs> {};
in
pkgs.wrapFirefox pkgs.firefox-bin-unwrapped {
browserName = "firefox";
pname = "firefox-bin";
desktopName = "Firefox";
nixExtensions = [
(pkgs.fetchFirefoxAddon {
name = "ublock";
url = "https://addons.mozilla.org/firefox/downloads/file/3679754/ublock_origin-1.31.0-an+fx.xpi";
sha256 = "1h768ljlh3pi23l27qp961v1hd0nbj2vasgy11bmcrlqp40zgvnr";
})
];
extraPolicies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
FirefoxHome = {
Pocket = false;
Snippets = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
extraPrefs = ''
// Show more ssl cert infos
lockPref("security.identityblock.show_extended_validation", true);
// Enable userchrome css
lockPref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// Enable dark dev tools
lockPref("devtools.theme","dark");
'';
} |
Thanks for testing it! I can't change that behavior because this is up to the Firefox developers to decide how to handle the case when an extension gets removed through not being on the whitelist anymore. Upgrading addons works fine though |
firefox-bin is incompatible with the wrapper. The binary does not load configuration from the # For manpages, in case the program supplies them
mkdir -p $out/nix-support
echo ${browser} > $out/nix-support/propagated-user-env-packages |
1bf8dec
to
2484dad
Compare
while at it can you also replace |
Would be nice to document it though, so ppl can make backups of their settings. |
ad9bc39
to
b00bc2f
Compare
Done |
Done |
otherwise looks good; thanks for working on this by the way! |
b00bc2f
to
8b8fb23
Compare
a1adc03
to
1c8c134
Compare
Motivation for this change
In the current firefox wrapper every addon update discards the addon settings, like mentioned here #105783 (comment)
Things done
This change makes the extid static and user defined. The wrapper makes sure that every addon name is unique.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)