LibreWolf Browser Configuration

Overview

LibreWolf is configured declaratively in modules/features/librewolf.nix. Browser settings, search engines, container tabs, and extensions install automatically. Privacy is enabled by default (WebRTC disabled, clear data on shutdown, etc.).

After installation, you need to:

  1. Configure uBlock Origin

    Enable privacy and malware filter lists

  2. Configure Tridactyl

    Set up Vim-style keyboard navigation

Optional:

Later, if you want to customize:

The rest of this guide explains browser preferences, search engines, container tabs, cookie exceptions, and how to add more extensions or change settings.

Declarative Configuration

All browser preferences, extensions, and policies are configured in modules/features/librewolf.nix. After modifying the configuration, rebuild the system:

sudo nixos-rebuild switch --flake .

Browser Preferences

Key preferences configured in the module:

Privacy:

UX Improvements:

General Settings:

Vertical Tabs:

Search Engines

Search engines are enforced through enterprise policies (policies.SearchEngines in modules/features/librewolf.nix), which also locks the default engine in the browser UI:

Container Tabs

Seven container tabs are preconfigured for compartmentalizing browsing:

  1. Personal (Blue, Fingerprint icon)
  2. Work (Yellow, Briefcase icon)
  3. Banking (Green, Dollar icon)
  4. Shopping (Pink, Cart icon)
  5. Academic (Purple, Circle icon)
  6. Programming (Orange, Fence icon)
  7. Art (Turquoise, Tree icon)

Container tabs isolate cookies and site data between contexts.

Installed Extensions

Extensions are installed automatically via policies:

Extensions are force-installed and cannot be removed from the browser UI.

Sites with persistent cookie access configured via policies as exceptions in modules/features/librewolf.nix under policies.Cookies.Allow.

Extension Configuration

Some extensions require additional configuration after installation.

uBlock Origin

Configure uBlock Origin for optimal privacy and performance:

  1. Open the uBlock Origin dashboard (click extension icon → Settings gear icon)

  2. Navigate to Settings tab

    Enable all privacy options:

  3. Navigate to Filter lists tab

    Enable all privacy and malware domains filters:

  4. Import custom filters (optional)

    If you have custom static filters or dynamic rules, import them:

Tridactyl

Configure Tridactyl for Vim-like keyboard navigation:

  1. Open LibreWolf and type : to open Tridactyl command mode

  2. Execute the following commands to configure keybindings:

    :bind D tabclosealltoright
    :bind j scrollline 5
    :bind k scrollline -5
    :bind J tabnext
    :bind K tabprev
    :set newtab about:blank
    :set tabopencontaineraware true
    :unbind <C-f>

These settings:

KeePassXC Browser

KeePassXC native messaging is configured automatically via nativeMessagingHosts. The extension should connect to KeePassXC without additional setup.

If connection issues occur, verify KeePassXC is running and browser integration is enabled in KeePassXC settings.

Toolbar Customization

Customize the toolbar appearance:

  1. Right-click on the toolbar area
  2. Select Customize Toolbar...

Recommended toolbar setup:

The bookmarks toolbar is hidden by default via browser.toolbars.bookmarks.visibility = "never".

Persistence

LibreWolf profile data is persisted to /persist/home/user/.librewolf via impermanence configuration. This preserves:

Modifying Configuration

Adding Extensions

To add a new extension:

  1. Find the extension addon ID in about:support under Add-ons

  2. Add entry to policies.ExtensionSettings in modules/features/librewolf.nix:

    "[email protected]" = {
      installation_mode = "force_installed";
      install_url = "https://addons.mozilla.org/firefox/downloads/latest/extension-name/latest.xpi";
    };
  3. Rebuild system: sudo nixos-rebuild switch --flake .

Changing Preferences

Modify browser preferences in modules/features/librewolf.nix under settings:

settings = {
  "preference.name" = value;
  # Example:
  "browser.startup.homepage" = "https://nixos.org";
};

Find preference names via about:config in LibreWolf (search for preference, right-click → Copy Preference Name).

Adding Container Tabs

Add new container tabs in modules/features/librewolf.nix under containers:

containers = {
  container-name = {
    id = 8;  # Unique ID
    color = "red";  # Color name
    icon = "icon-name";  # Icon identifier
  };
};

Available colors: blue, turquoise, green, yellow, orange, red, pink, purple Available icons: fingerprint, briefcase, dollar, cart, circle, fence, tree, fruit, pet, etc.