-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
bug: HM backups its own generated files #5726
Comments
Pinging @rycee, @kira-bruneau and @brckd as this seems to be a problem with the firefox module. |
But why you often need to delete this file? This shouldn't be necessary with nix. |
For reference, this file is generated here: https://github.com/nix-community/home-manager/blob/master/modules/programs/firefox/mkFirefoxModule.nix#L856-L1001 |
Well because hm backs it up and then complains, that there is a collision. But, as mentioned above, the backup and the newly generated file do not differ so I don't know why the backup is made in the first place. |
As I tried to explain, the content of the file doesn't change, but the way it's encoded does. HM replaces the file because its bytes differ from the previous file due to the encoding. I'm as clueless as you as to what causes it to encode differently, but I can check when I'm back from vacation. A possible fix would be to only generate the file when the config is changed, but I don't know whether that's possible. In the meantime, check out this comment which shows how to replace the file unconditionally. It should look something like this: home.file.".mozilla/firefox/<profile-name>/search.json.mozlz4".force = true |
Oh yep this is a duplicate of #3698. It sounds like you need to use the force option like @brckd mentioned. This is pretty easy to forget though and isn't that discoverable if you don't look through the docs. I was planning on refactoring the search submodule to require an |
okay closing then |
Are you following the right branch?
Is there an existing issue for this?
Issue description
I'm using the home-manager
firefox
module and defined some custom search engines like so:Config Snippet
Now I'm facing an issue where sometimes (ca. 40%) when I rebuild
home-manager
backups a file namedsearch.json.mozlz4
in~/.mozilla/firefox/<profile-name>
. This file was generated byhome-manager
so I'm not sure why it does that. But when comparing the two files they are identical, so I'm wondering whyhome-manager
even tries to create a backup.This gets really annoying as I have to delete this file on a regular basis.
Maintainer CC
No response
System information
The text was updated successfully, but these errors were encountered: