Best way to configure Firefox + Extensions?

Hi,
I want to declarative configure my Firefox, ideally completely:

  • Configure preferences + lock them
  • Install extensions and configure them

But I’m a bit confused since there are several ways. (I’m on NixOS)

  • Using system wide Nix options like programs.firefox.policies which sounds good. And it says I can install extensions aswell, nice! But what if I have a multi-user system? Will all have the same settings/extensions? Ideally I wanna do it per-user with home-manager.
  • Home-manager seems to have less options than Nix itself…
  • Currently I’m using Firefox Sync, which syncs bookmarks, preferences, extensions and extension settings. This is basically all I want, but I couldn’t find a way to programatically sign in to Sync and enable it automatically.

Altought the way to configure everything through Nix sounds better, I need to use Sync in the end anyway, because I need to use my Firefox config also on two Windows computers.

Which route do you go and what would you recommend? I’m a bit overwhelmed by the differenc choices and I’m not sure which one might work best for me.

Personally I use home-manager, since it’s user-specific and so far has provided everything I’ve needed, including extensions and detailed settings, while also being able to travel to non-NixOS systems: https://github.com/TLATER/dotfiles/blob/b39af91fbd13d338559a05d69f56c5a97f8c905d/home-config/config/graphical-applications/firefox.nix

Yes, it can’t set system-wide policies, but so far I’ve not needed any of them.

God knows how this interacts with sync though. I avoid that because it’s too creepy, even coming from mozilla.

Regarding privacy concerns its possible to host the sync service yourself. I might even consider this, especially since there is a nix package for this. :exploding_head:

What I couldn’t find in your config is 1.) extension settings and 2.) how do you handle bookmarks?
Apart from that it looks good as far as I can tell.

btw. how do you figure out the option names from about:config? In the past I 99% configured my Firefox through the GUI. Any tip on how to find which option name corresponds to which GUI setting?
Might be possible to somehow dump the about:config state, then toggling a setting, dumping again and diff… but idk, imaginable there’s a more convenient solution out there.

It is, but I found it impossible to set up, as last time I checked support for this had practically abandoned.

Oh, huh, maybe worth another try.

Yep. Mostly I just don’t configure my extensions. They’re much more tricky to manage.

I’ve seen some murmurs that they can also be edited through the user prefs, but I think that’s outdated information, as to my knowledge their preferencea are stored using an sql database for each addon, at least since firefox quantum.

It’s possible that this can still be modified using user prefs, but I’ve not managed to find out how yet.

I don’t use bookmarks, I just use my browsing history or the rather quick auto complete for sites I visit often. Tridactyl makes it pretty economical to just start typing a URL.

You can manage them with home-manager though: Appendix A. Configuration Options

So far I’ve just searched with search engines whenever I’ve had to toggle one, or looked at about:config - lots of things get auto changed for about:config that have nothing to do with your changes, though, so it’s not always useful.

Projects like arkenfox can be helpful.