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

declarative configurations of firefox extensions #4618

Open
teto opened this issue Oct 30, 2023 · 5 comments
Open

declarative configurations of firefox extensions #4618

teto opened this issue Oct 30, 2023 · 5 comments

Comments

@teto
Copy link
Collaborator

teto commented Oct 30, 2023

Description

We support declarative configuration of firefox but what about its addons ? I recently had to setup a new machine and lost access to my firefox sync profile and there are some extensions I would like to keep my settings via nix instead, for instance this one
https://addons.mozilla.org/en-US/firefox/addon/refined-github-/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search which I like but has a few bad defaults.

I have no idea how this works, if it's even possible. I suspect addons can use any mechanism they want unless they care about firefox sync. I found https://discourse.mozilla.org/t/in-which-file-are-stored-an-add-on-settings-options/26064 but I have no storage.js in my ~/.mozilla it looks like

NB: I know about #606 but wanted a distinct more focused issue

@GetPsyched
Copy link

GetPsyched commented Oct 31, 2023

I wanted this for a long time too!

I did some digging and found:

  1. Firefox's own management of extension configuration goes in these 2 files:
    • ~/.mozilla/firefox/<profile>/extension-settings.json # couldn't really decipher much of this
    • ~/.mozilla/firefox/<profile>/extension-preferences.json # this has permissions and origins for both themes and extensions
  2. Extensions themselves can have their own files in any location within a Firefox profile for their config (assumption)
    • The containers extension saves its container config in ~/.mozilla/firefox/<profile>/containers.json
    • Extension state (not exactly config) are stored in ~/.mozilla/firefox/<profile>/storage/default/moz-extension+++<uuid>

I've only recently learnt how to create NixOS modules, so, I can't help much in actually making a declarative config module (though I might later down the line) but yeah this definitely seems quite messy and/or volatile in terms of what config goes where. Perhaps someone with hands on experience messing with Firefox config would have a better idea.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/set-firefox-extension-settings-in-home-manager/35076/2

Copy link

stale bot commented Feb 4, 2024

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Feb 4, 2024
@DamienCassou
Copy link
Contributor

I don’t think there is a way to configure extensions in general except through policies and most extensions don’t seem to support policy-based configuration.

I think we should close the issue as I don't think there is anything home-manager can do.

Copy link

stale bot commented Jun 9, 2024

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants