{ pkgs, ... }:
{
  programs.firefox = {
    enable = true;
    languagePacks = [
      "en"
      "ru"
    ];
    profiles = {
      rus07tam = {
        isDefault = true;
        search = {
          force = true;
          default = "searx";
          engines = {
            "GitHub" = {
              urls = [
                {
                  template = "https://github.com/search";
                  params = [
                    {
                      name = "q";
                      value = "{searchTerms}";
                    }
                    {
                      name = "type";
                      value = "code";
                    }
                  ];
                }
              ];
              icon = "https://github.githubassets.com/favicons/favicon.svg";
              definedAliases = [ "@gh" ];
            };
            "SearXNG" = {
              urls = [
                {
                  template = "https://search.ruject.fun";
                  params = [
                    {
                      name = "q";
                      value = "{searchTerms}";
                    }
                  ];
                }
              ];
              icon = "${pkgs.searxng}/share/static/themes/simple/img/favicon.svg";
              definedAliases = [
                "@searx"
                "@searxng"
              ];
            };
            "Nix Packages" = {
              urls = [
                {
                  template = "https://search.nixos.org/packages";
                  params = [
                    {
                      name = "channel";
                      value = "unstable";
                    }
                    {
                      name = "query";
                      value = "{searchTerms}";
                    }
                  ];
                }
              ];
              icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
              definedAliases = [ "@np" ];
            };
            "MyNixOS" = {
              urls = [
                {
                  template = "https://mynixos.com/search";
                  params = [
                    {
                      name = "q";
                      value = "{searchTerms}";
                    }
                  ];
                }
              ];
              icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake-white.svg";
              definedAliases = [ "@mn" ];
            };
          };
        };
      };
    };
  };

  stylix.targets.firefox.profileNames = [ "rus07tam" ];
}
