This is my own librewolf configuration implemented as a flake.
Why librewolf instead of firefox?
I got frustrated with Firefox. The default settings are not always configured with the user privacy or user experience in mind. Librewolf on the other hand have much more sane defaults so I might as well use librewolf.
This flake configures the followings:
- Bookmarks.
- Extensions.
- Preferences.
- Lowers some of the privacy settings on some specific sites (e.g. twitch does not work by default on librewolf without disabling fingerprinting).
If you'd like to build your own derivation of firefox or librewolf, feel free
to take inspiration from this repository. Swapping librewolf for firefox only
requires you to change pkgs.librewolf-unwrapped with pkgs.firefox-unwrapped
in ./nix/package.nix.
You can directly try the package by running:
nix run "github:pierrot-lc/librewolf-nix"The overlay will populate your list of available packages with the additional
librewolf-nix package (with the default configuration). Here's a minimal
example:
# flake.nix
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
librewolf-nix = {
url = "github:pierrot-lc/librewolf-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
librewolf-nix,
...
}: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import nixpkgs {
inherit system;
overlays = [
librewolf-nix.overlays.${system}.default;
];
};
in {
# The package is available at `pkgs.librewolf-nix`.
...
};
}The module is useful to specify your own configuration of the package:
# flake.nix
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
librewolf-nix = {
url = "github:pierrot-lc/librewolf-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
librewolf-nix,
...
}: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import nixpkgs {
inherit system;
};
in {
homeConfigurations = {
username = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
inputs.librewolf-nix.hmModules.${system}.default
];
};
};
};
}# home.nix
{pkgs, ...}: {
librewolf-nix = {
enable = true;
nativeMessagingHosts = with pkgs; [bukubrow];
};
}You can find the list of available options in ./nix/module.nix.
- Manage search engines. It looks like it should be done by modifying the
search.json.mozlz4file, which is quite cumbersome. This is how HM is doing.