Some applications (Firefox, Mousepad) do not open anymore with my settings but as "first-time opened" after nightly nixos update (using unstable channel)

Some weeks ago I decided to switch from stable 21.05 to unstable and also enabled the autoupdate on the configuration.nix (did not set up any specific time on when to update). I have not had any problems and probably not even any update since I always turn off my laptop before night. Some days ago I had to leave the laptop on during the night and then, after rebooting, I noticed that some apps (like Firefox and mousepad) do not remember all my settings. It is like I have a new fresh install of nixos and I just opened them for the first time. On the other hand, applications like Thunar or polybar still continue to work remembering all the settings (as it should be). I don’t know what has caused the issue but was just wondering if maybe there is an easy explanation for what has happened to me. I tried to go back to an early derivation (only have 3 in total now since I had done also enabled and done some garbage collection) but still no sign to reopen Firefox or mousepad with my previous settings.

1 Like

Firefox is one of a handful non-xdg compliant applications, by default it will dump its config and other contents into ~/.mozilla/firefox.

I don’t know about mousepad, but maybe the pattern is deleting some files in your home directory that aren’t in ~/.config? This may not even have been caused by an update, it might have just been your first Firefox restart since you accidentally deleted something.

Note your Firefox configuration isn’t included in your nix config unless you go out of your way to add it with home-manager. Some things aren’t actually even possible to set deterministically… Firefox isn’t a great browser when it comes to configuration replication, but so is basically no browser out there. Hence the need for all those terrifying “sync” services.

You do not even need home-manager these days Firefox nix addon support by Luis-Hebendanz · Pull Request #91724 · NixOS/nixpkgs · GitHub. But yeah, unless there is a bug, it should not clear the settings.

Oh, cool, no wonder my librewolf patch doesn’t apply anymore :slight_smile:

What do you mean by “maybe the pattern is deleting…” ?

I have actually set up firefox addons on my home-manager and I can see the addons are still present on my “new” firefox, even though all settings (including the ones of the extensions) are lost.

I can see that Firefox saves the settings in .mozilla but Mousepad saves them in the .config folder. I was also surprised how two unrelated applications suffered from the same issue but not other applications.

I am just worried that now if start configuring Firefox or Mousepad again, this issue with all the settings getting resetted will happen again another time I restart the laptop… :confused:

I was mostly guessing at which kinds of applications would be affected, given mousepad doesn’t do Firefoxy things that theory is bust though.

For chrome there is sometimes the issue, that the last session and all stored cookies are lost (even session over arching). Even though they still exist on disk.

Current working theory is, that either HM or the system changes something that Chrome uses to generate a key that is used to validate/encrypt/decrypt the stored session data, cookies, local storage etc.

Currently though, we have not been able to identify what would be changed, nor have we been able to verify that our working theory is actually true.

The behaviour is only observed once in a blue moon, and as its just some cookies, its as simple as logging back in. The most annyoing thing is to reconfigure slack to use a dark theme…

Still, whatever happens to chrome session store, might be the same or at least similar to what happens to your firefox settings.