nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.69k stars 1.75k forks source link

Adding extensions to thunderbird #5654

Open Mikilio opened 1 month ago

Mikilio commented 1 month ago

Description

Thunderbirds extension mechanism is the same as Firefox, since Mozilla is working on it again (or since forever I don't really know) allowing to add extensions via nix would be nice.

To add this feature, It would be nice to add thunderbird extensions to @rycee 's NUR, because it already includes all the tools to add these easily by name if they are in the Mozilla's index.

A difference would be that thunderbird doesn't have a sync functionality (at least not yet). In Firefox, I did not care much about configuring extensions because I could store the settings in my Mozilla account, but that's not the case here. It's definitely not urgent, but maybe something to think about.

alois31 commented 1 month ago

The functionality as implemented in the Firefox module is quite problematic (https://github.com/nix-community/home-manager/issues/5652), and the issue is even worse for Thunderbird since the permissions required for certain actions seem to be less static there (in fact this is exactly how the issue was first noticed to begin with). If you are fine with the same extensions applying to all profiles and a semi-declarative approach, you can use policies to install extensions like this:

programs.thunderbird.package = pkgs.thunderbird.override {
  extraPolicies.ExtensionSettings = {
    "[id of the extension here]" = {
      installation_mode = "normal_installed";
      install_url = "[URL to the XPI file here]";
    };
  };
};
Mikilio commented 1 month ago

Thank you for the Tipp. Do you think there should be an issue to track declarative Mozilla stuff in general?