Librewolf KDE integration not working

After configuring my Librewolf with home-manager, the KDE integration still doesn’t work.

Config:

    programs.librewolf = {
      enable = true;
      # Enable WebGL, cookies, history and sync
      settings = {
        "webgl.disabled" = false;
        "privacy.resistFingerprinting" = false;
        "privacy.clearOnShutdown.history" = false;
        "privacy.clearOnShutdown.cookies" = false;
        "network.cookie.lifetimePolicy" = 0;
        "identity.fxaccounts.enabled" = true;
        "enablePlasmaBrowserIntegration" = true;  # Should enable KDE integration
      };
    };

Edit: Solved with this:

programs.firefox = {
    enable = true;
    package = pkgs.librewolf-wayland;
}

That is not a firefox setting and will just set a key in about:config that is never read. I don’t think HM has such an option Appendix A. Home Manager Configuration Options .

There is programs.chromium.enablePlasmaBrowserIntegration for nixos and the plasma module adds the package to the default firefox native extensiosn IIRC.

So how can I get KDE integration working with Librewolf? Is it possible?

I know I have the Plasma integration installed properly, it works fine on Firefox but not Librewolf

I think you can only get it to work by changing the package for programs.firefox. IIRC you can’t use both at the same time like this.

1 Like

The Firefox module has a programs.firefox.nativeMessagingHosts option for conveniently adding native messaging hosts packages like plasma-browser-integration.

For Libreworlf, we can manually do this in home-manager with:

# Librewolf Plasma integration
file.".librewolf/native-messaging-hosts/org.kde.plasma.browser_integration.json" = {
  enable = config.programs.librewolf.enable;
  source = "${pkgs.kdePackages.plasma-browser-integration}/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json";
};

or

# Librewolf Plasma integration
file.".librewolf/native-messaging-hosts" = {
  enable = config.programs.librewolf.enable;
  source = "${pkgs.kdePackages.plasma-browser-integration}/lib/mozilla/native-messaging-hosts";
  recursive = true;
};

Which should be enough to make the Plasma integration work.

If you use Plasma 5, replace kdePackages with libsForQt5.

Note: There is an open PR that makes Librewolf use the same options as Firefox, which might be worth keeping an eye on.

2 Likes