-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Module Name
programs.firefox (and forks like Librewolf or Floorp)
Requested Feature
Please add an option to modify sync extension settings in Firefox (and forks). It could be an option programs.firefox.profiles."<PROFILE>".extensions.settings."<EXTENSION>".syncSettings similar to programs.firefox.profiles."<PROFILE>".extensions.settings."<EXTENSION>".settings where the value is a JSON object.
Current Limitations
Firefox has 2 APIs for managing extension configurations, storage.local and storage.sync. The option added in #6389 works great for extensions that support local storage (like uBlock or DarkReader with extensions.settings."[email protected]".settings.syncSettings = false). But, it does not work with extensions relying on sync API (like SponsorBlock).
Test config
- Configure Librewolf
# Assuming `firefoxAddons` input is available (`gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons`) programs.librewolf = { enable = true; profiles.default = { isDefault = true; settings."extensions.autoDisableScopes" = 0; extensions = { force = true; packages = with inputs.firefoxAddons.packages.${pkgs.system}; [ sponsorblock ]; settings."[email protected]" = { force = true; settings = { categorySelections = [ { name = "sponsor"; option = 1; } ]; }; }; }; }; };
- Remove
~/.librewolfand rebuild the configuration - Launch Librewolf, it should start with the SponsorBlock welcome tab
- Notice that Sponsor category is set to Auto skip when it should be Manual skip (
option = 1)
Additional Context
Sync configurations are stored in ~/.librewolf/<PROFILE>/storage-sync-v2.sqlite file in the table storage_sync_data having these properties:
ext_id: like[email protected]data: JSON configuration stored as textsync_change_counter: not sure what this one is
Manually writing an example configuration to this file before starting Librewolf works. The generated file should not be write protected though.