Open nfelber opened 8 months ago
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 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 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.
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.
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 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 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.
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.
Are you following the right branch?
Is there an existing issue for this?
Issue description
Issue
On every launch, Thunderbird adds a new line
user_pref("mail.account.account<N>.server", "server1");
toprefs.js
of the profile being used, with<N>
a value incrementing in steps of 1. The parametermail.account.lastKey
is also incremented to be equal to the largest<N>
. It doesn't affect the accounts declared in the home-manager nix config.Example
prefs.js
after launching and closing Thunderbird 5 times:Possible explanation
The
thunderbird.nix
module sets themail.accountmanager.accounts
parameter in theuser.js
file of the profile as the comma separated concatenation of the names of the accounts declared in the home-manager nix config (these names are based on hashes of the actual account names). This parameter controls which accounts show up in Thunderbird's folder pane and in which order[^1]. On startup, Thunderbird reads theuser.js
file and copies all its parameters toprefs.js
(overwriting existing ones).In my understanding: as no local folders account is listed in
mail.accountmanager.accounts
, Thunderbird creates a new one (with an incrementally increasing number in the name to avoid conflicts with existing ones) and appends it tomail.accountmanager.accounts
inprefs.js
to make the local folders appear in the folder pane. On subsequent launches, the value ofmail.accountmanager.accounts
inprefs.js
will be overwritten by the value fromuser.js
, resulting in a cycle.Workaround
I was able to solve both the automatic local folders account creation and the ordering issues by manually setting the
mail.accountmanager.accounts
value (with desired ordering andaccount1
appended) using thesettings
option of thethunderbird.nix
module.[^1]: A related issue is that there is currently no way to declare the order in which the accounts should appear using the
thunderbird.nix
module, and any modification to this order made in the UI (i.e. written toprefs.js
) will be overwritten (byuser.js
) on the next launch.Maintainer CC
meta.maintainers
: @d-dervishi @jkarlsonThanks!
System information