-
-
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: search.json.mozlz4 symlink being replaced by file #3698
Comments
Oh yep, there's a The docs mention that this is recommened when customzing search, but do you think theres anything that could help make this more discoverable? |
Thanks @kira-bruneau , that indeed works nicely. I understand why it's not enabled by default. I did not study all search related options before playing with it. Maybe the |
Did a flake update and rebuild, everything went back to normal again. So not sure if I can reproduce this. But I did lost my search profile at one point of time. |
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 you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon'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. |
This happened again today, here's my setting: https://github.com/sg-qwt/nixos/blob/main/modules/profiles/firefox.nix Suddenly somehow there's a Bing added into my search engines and it becomes my default. You can see all the hard coded engines with home-manager are still there. I'm pretty sure firefox is doing something shaddy this case, but I don't know which option can toggle that off. (Ps. I don't use firerfox sync or anything, I only use that profile on a single nixos machine, so that's impossible the Bing is synced from other machine.) |
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 you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon'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. |
I am running into a similar issue. For me, Firefox replaces the This is what Firefox generates (I decompressed the mozlz4 file to JSON) by default on my machine: {
"version": 9,
"engines": [
{
"id": "[email protected]",
"_name": "Google",
"_isAppProvided": true,
"_metaData": {
"order": 1
}
},
{
"id": "[email protected]",
"_name": "Wikipedia (en)",
"_isAppProvided": true,
"_metaData": {
"order": 6
}
},
{
"id": "[email protected]",
"_name": "Bing",
"_isAppProvided": true,
"_metaData": {
"order": 3
}
},
{
"id": "[email protected]",
"_name": "Amazon.com.au",
"_isAppProvided": true,
"_metaData": {
"order": 2
}
},
{
"id": "[email protected]",
"_name": "DuckDuckGo",
"_isAppProvided": true,
"_metaData": {
"order": 4
}
},
{
"id": "[email protected]",
"_name": "eBay",
"_isAppProvided": true,
"_metaData": {
"order": 5
}
},
{
"id": "[email protected]",
"_name": "Kagi",
"_loadPath": "[addon][email protected]",
"description": "A simple helper extension for setting Kagi as a default search engine, and automatically logging in to Kagi in incognito browsing windows.",
"_iconURL": "moz-extension://a739de3a-89db-430a-a0ec-9ec32a96e127/icons/icon_32px.png",
"_iconMapObj": {
"{}": "moz-extension://a739de3a-89db-430a-a0ec-9ec32a96e127/icons/icon_180px.png"
},
"_metaData": {
"order": 7
},
"_urls": [
{
"params": [],
"rels": [],
"template": "https://kagi.com/search?q={searchTerms}"
},
{
"params": [],
"rels": [],
"template": "https://kagi.com/api/autosuggest?q={searchTerms}",
"type": "application/x-suggestions+json"
}
],
"_telemetryId": null,
"_definedAliases": [
"@kagi"
],
"_extensionID": "[email protected]",
"_locale": "default"
}
],
"metaData": {
"useSavedOrder": true,
"locale": "en-US",
"region": "AU",
"channel": "default",
"experiment": "",
"distroID": "nixos",
"appDefaultEngineId": "[email protected]"
}
} I'd like to set programs.firefox = {
enable = true;
profiles.default = {
search = {
force = true;
default = "Kagi";
};
};
}; This is the file that gets generated as a result: {
"engines": [
{
"_isAppProvided": true,
"_metaData": {},
"_name": "Kagi"
}
],
"metaData": {
"current": "Kagi",
"hash": "MvrjMMu1KsjzeFZZC6h8d/S4qV1wtYUna6dsR5kULFs=",
"useSavedOrder": false
},
"version": 6
} The immediate difference seems to be that home-manager generates version 6 whereas Firefox puts version 9 there. It appears to me that what happens is that Firefox "upgrades" the file a newer version and in the process, puts Google back as the default search engine. It tried to naively set |
I'm having the same issues with the search not saving Kagi as my preference (it then defaults to Google even though it's hidden) though my search.json.mozlz4 looks different to @thomaseizinger's. Note: I've only been using nixos/hm for like 2 days so I could very easily be doing something incorrect 😄 firefox.nix { config, pkgs, inputs, ... }:
{
programs.firefox = {
enable = true;
profiles = {
home = {
isDefault = true;
search = {
force = true;
default = "Kagi";
engines = {
"Wikipedia (en)".hidden = true;
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Amazon.co.uk".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
"DuckDuckGo".metaData.hidden = true;
};
};
};
};
};
}; search.json.mozlz4 {
"engines": [
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "Amazon.co.uk"
},
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "Amazon.com"
},
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "Bing"
},
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "DuckDuckGo"
},
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "Google"
},
{
"_isAppProvided": true,
"_metaData": {},
"_name": "Kagi"
},
{
"_isAppProvided": false,
"_loadPath": "[home-manager]/programs.firefox.profiles.home.search.engines.\"Wikipedia (en)\"",
"_metaData": {},
"_name": "Wikipedia (en)",
"hidden": true
},
{
"_isAppProvided": true,
"_metaData": {
"hidden": true
},
"_name": "eBay"
}
],
"metaData": {
"current": "Kagi",
"hash": "Pgrc7HKDMIFNrb5hXu95bPmjo0b9+V+G1Dq8D4jXN6M=",
"useSavedOrder": false
},
"version": 6
} |
this used to be circumvented by `rm `/path/to/firefox/search.json.mozlz4` then running the nixos-rebuild again relevant issue: nix-community/home-manager#3698
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 you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon'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
Firefox causes home-manager to fail restarting.
After restarting Firefox, the
search.json.mozlz4
symlink is replaced by a file. This causes the home-manager to fail with:I use home-manager as a module in NixOS. The
home-manager
command is thus not available, andnixos-rebuild switch --flake
does not have a-b backup
flag. The only way out is indeed to manually removesearch.json.mozlz4
. Then the symlink is re-created.NixOS 22.11.20230222.c95bf18 (Raccoon)
Home-manager rev 2cb27c7
Maintainer CC
@rycee @kira-bruneau
System information
The text was updated successfully, but these errors were encountered: