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:
Enable privacy and malware filter lists
Set up Vim-style keyboard navigation
Optional:
Unpin extension icons, clean up toolbar
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.
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 .Key preferences configured in the module:
Privacy:
media.peerconnection.enabled = false)geo.enabled = false)media.eme.enabled = false)UX Improvements:
General Settings:
Vertical Tabs:
sidebar.animation.expand-on-hover.delay-duration-ms maxed,
reference https://bugzilla.mozilla.org/show_bug.cgi?id=1983125)Ctrl+BSearch engines are enforced through enterprise policies
(policies.SearchEngines in
modules/features/librewolf.nix), which also locks the
default engine in the browser UI:
@googleSeven container tabs are preconfigured for compartmentalizing browsing:
Container tabs isolate cookies and site data between contexts.
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.
Some extensions require additional configuration after installation.
Configure uBlock Origin for optimal privacy and performance:
Open the uBlock Origin dashboard (click extension icon →
Settings gear icon)
Navigate to Settings tab
Enable all privacy options:
Navigate to Filter lists tab
Enable all privacy and malware domains filters:
Update now to download latest filter listsImport custom filters (optional)
If you have custom static filters or dynamic rules, import them:
My filters tab → Import and appendMy rules tab → Import and appendConfigure Tridactyl for Vim-like keyboard navigation:
Open LibreWolf and type : to open Tridactyl command
mode
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:
D - Close all tabs to the rightj/k - Scroll down/up by 5 linesJ/K - Navigate to next/previous tabKeePassXC 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.
Customize the toolbar appearance:
Customize Toolbar...Recommended toolbar setup:
The bookmarks toolbar is hidden by default via
browser.toolbars.bookmarks.visibility = "never".
LibreWolf profile data is persisted to
/persist/home/user/.librewolf via impermanence
configuration. This preserves:
To add a new extension:
Find the extension addon ID in about:support under Add-ons
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";
};Rebuild system:
sudo nixos-rebuild switch --flake .
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).
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.