Librewolf

From NixOS Wiki
Jump to: navigation, search

LibreWolf is a web browser and fork of Firefox with an emphasis on privacy and security. It is a custom and independent version of Firefox that aims to increase protection against tracking and fingerprinting techniques, while also removing all the telemetry, data collection and annoyances.

Installation

To install the standard and stable LibreWolf version, that you do not want to configure a lot, add the following line to your system configuration:

To install LibreWolf, add the following line to your system configuration:

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
environment.systemPackages = with pkgs; [ pkgs.librewolf ];


Configuration

Home Manager

It is possible to configure certain presets of LibreWolf using the Home Manager module:

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
home-manager.users.myuser = {
  programs.librewolf = {
    enable = true;
    # Enable WebGL, cookies and history
    settings = {
      "webgl.disabled" = false;
      "privacy.resistFingerprinting" = false;
      "privacy.clearOnShutdown.history" = false;
      "privacy.clearOnShutdown.cookies" = false;
      "network.cookie.lifetimePolicy" = 0;
    };
  };
};


This example configures LibreWolf to enable WebGL, remember cookies and browsing history by disabling the default privacy and security settings. While it is possible to adjust all settings directly within the LibreWolf browser itself, doing so is not recommended, because this approach can result your settings not being preserved when you transfer your main NixOS configuration to another system. Additionally, always remember that enabling these settings compromises the privacy concepts of LibreWolf and is therefore not recommended.

System-wide

For system-wide configuration you need to use the Firefox program module, overriding the package attribute with the LibreWolf package, e.g.

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
programs.firefox = {
  enable = true;
  package = pkgs.librewolf;
  policies = {
    DisableTelemetry = true;
    DisableFirefoxStudies = true;
    Preferences = {
      "cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
      "cookiebanners.service.mode" = 2; # Block cookie banners
      "privacy.donottrackheader.enabled" = true;
      "privacy.fingerprintingProtection" = true;
      "privacy.resistFingerprinting" = true;
      "privacy.trackingprotection.emailtracking.enabled" = true;
      "privacy.trackingprotection.enabled" = true;
      "privacy.trackingprotection.fingerprinting.enabled" = true;
      "privacy.trackingprotection.socialtracking.enabled" = true;
    };
    ExtensionSettings = {
      "jid1-ZAdIEUB7XOzOJw@jetpack" = {
        install_url = "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/latest.xpi";
        installation_mode = "force_installed";
      };
      "uBlock0@raymondhill.net" = {
        install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
        installation_mode = "force_installed";
      };
    };
  };
};


This will install LibreWolf, configure some settings and install extensions when a users starts LibreWolf for the first time.