Skip to content
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: Firefox search engines icons are missing #6450

Open
2 tasks done
jhakonen opened this issue Feb 14, 2025 · 2 comments · May be fixed by #6505
Open
2 tasks done

bug: Firefox search engines icons are missing #6450

jhakonen opened this issue Feb 14, 2025 · 2 comments · May be fixed by #6505
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@jhakonen
Copy link

jhakonen commented Feb 14, 2025

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Search engines in Firefox are missing their icons even though I have configured them via home-manager. See screenshot:

Image

Here's my configuration for search engines:

{
  programs.firefox = {
    enable = true;
    profiles.hakonen = {
      search = {
        force = true;
        default = "Kagi";
        engines = {
          "Kagi" = {
            urls = [{
              template = "https://kagi.com/search?q={searchTerms}";
            }];
            iconUpdateURL = "https://kagi.com/favicon.ico";
            definedAliases = [ "@k" ];
          };
          "StartPage" = {
            urls = [{
              template = "https://www.startpage.com/sp/search?query={searchTerms}";
            }];
            iconUpdateURL = "https://www.startpage.com/favicon.ico";
            definedAliases = [ "@sp" ];
          };
          "Noogle" = {
            urls = [{
              template = "https://noogle.dev?term={searchTerms}";
            }];
            icon = ../../assets/noogle.png;
            definedAliases = [ "@nog" ];
          };
          "Nix Packages" = {
            urls = [{
              template = "https://search.nixos.org/packages?query={searchTerms}";
            }];
            icon = ../../assets/nix-packages.png;
            definedAliases = [ "@np" ];
          };
          "Nix Options" = {
            urls = [{
              template = "https://search.nixos.org/options?query={searchTerms}";
            }];
            icon = ../../assets/nix-options.png;
            definedAliases = [ "@no" ];
          };
          "NixOS Wiki" = {
            urls = [{
              template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
            }];
            icon = ../../assets/nix-wiki.png;
            definedAliases = [ "@nw" ];
          };
          "Bing".metaData.hidden = true;
          "Amazon.nl".metaData.hidden = true;
          "Google".metaData.hidden = true;
        };
        order = [ "Kagi" "Noogle" "Nix Packages" "Nix Options" "NixOS Wiki" "StartPage" ];
      };
    };
  };
}

I further looked into the generated ~/.mozilla/firefox/hakonen/search.json.mozlz4 file and I can see that the _iconURL fields are present and seem to point to correct location. When I start Firefox however, the file changes and the _iconURL fields disappear from the file.

I've attached an archive search.json.mozlz4.zip that contains two versions of my search.json.mozlz4 file:

  • search.json.mozlz4.before which is the generated file, Firefox was not running at this point
  • search.json.mozlz4.after which was modified by Firefox when I started it

You can see what they contain with commands:

nix-shell -p mozlz4a --run 'mozlz4a -d search.json.mozlz4.before' | nix-shell -p jq --run jq
nix-shell -p mozlz4a --run 'mozlz4a -d search.json.mozlz4.after' | nix-shell -p jq --run jq

EDIT: My Firefox version is 135.0.

Maintainer CC

@kira-bruneau

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.8.0-1020-oem, Ubuntu, 24.04.2 LTS (Noble Numbat), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.9`
 - nixpkgs: `/home/hakonen/.nix-defexpr/channels/nixpkgs`
@jhakonen jhakonen added bug triage Issues or feature request that have not been triaged yet labels Feb 14, 2025
@kira-bruneau
Copy link
Contributor

Oh weird - thanks for catching this @jhakonen! I'll take some time today to look into this.

@kira-bruneau
Copy link
Contributor

kira-bruneau commented Feb 16, 2025

Ok, it looks like they dropped support for _iconURL in https://phabricator.services.mozilla.com/D228441 in favour of _iconMapObj. I'll update the docs and include a migration to the new format!

@kira-bruneau kira-bruneau linked a pull request Feb 20, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants