Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.librewolf.enable

Whether to enable LibreWolf. LibreWolf is a privacy enhanced Firefox fork.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.librewolf.enableGnomeExtensions

Whether to enable the GNOME Shell native host connector. Note, you also need to set the NixOS option services.gnome.gnome-browser-connector.enable to true.

Type: boolean

Default:

false

Declared by:

programs.librewolf.package

The LibreWolf package to use. If state version ≥ 19.09 then this should be a wrapped LibreWolf package. For earlier state versions it should be an unwrapped LibreWolf package. Set to null to disable installing LibreWolf.

Type: null or package

Default:

pkgs.librewolf

Example:

pkgs.librewolf.override {
  # See nixpkgs' firefox/wrapper.nix to check which options you can use
  nativeMessagingHosts = [
    # Gnome shell native connector
    pkgs.gnome-browser-connector
    # Tridactyl native connector
    pkgs.tridactyl-native
  ];
}

Declared by:

programs.librewolf.darwinDefaultsId

The id for the darwin defaults in order to set policies

Type: null or string

Default:

null

Example:

"com.developer.app"

Declared by:

programs.librewolf.finalPackage

Resulting LibreWolf package.

Type: null or package (read only)

Default:

null

Declared by:

programs.librewolf.globalExtensions

Add-on package to install under policies. For a package to work here it needs and addonId exposed in it’s passthru. This will be included in all add-ons accessible from the Nix User Repository. Once you have NUR installed run

$ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons

to list the available LibreWolf add-ons.

Installing extensions this way will automatically enable extensions inside LibreWolf after the first installation.

Type: list of (package or (submodule))

Default:

[ ]

Example:

with pkgs.nur.repos.rycee.firefox-addons; [
  privacy-badger
  {
    package = ublock-origin;
    settings = {
      private_browsing = true;
    };
  }
]

Declared by:

programs.librewolf.languagePacks

The language packs to install. Available language codes can be found on the releases page: https://releases.mozilla.org/pub/firefox/releases/${version}/linux-x86_64/xpi/, replacing ${version} with the version of LibreWolf you have. If the version string of your Firefox derivative diverts from the upstream version, try setting the release option.

Type: list of string

Default:

[ ]

Example:

[
  "en-GB"
  "de"
]

Declared by:

programs.librewolf.nativeMessagingHosts

Additional packages containing native messaging hosts that should be made available to LibreWolf extensions.

Type: list of package

Default:

[ ]

Declared by:

programs.librewolf.pkcs11Modules

Additional packages to be loaded as PKCS #11 modules in Firefox.

Type: list of package

Default:

[ ]

Declared by:

programs.librewolf.policies

See list of policies.

Type: attribute set of (JSON value)

Default:

{ }

Example:

{
  BlockAboutConfig = true;
  DefaultDownloadDirectory = "\${home}/Downloads";
  ExtensionSettings = {
    "uBlock0@raymondhill.net" = {
      default_area = "menupanel";
      install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
      installation_mode = "force_installed";
      private_browsing = true;
    };
  };
}

Declared by:

programs.librewolf.profiles

Attribute set of LibreWolf profiles.

Type: attribute set of (submodule)

Default:

{ }

Example:

{ }

Declared by:

programs.librewolf.profiles.<name>.bookmarks

Declarative bookmarks.

Type: (submodule) or ((list of ((bookmark submodule) or (directory submodule) or value “separator” (singular enum))) or (attribute set of ((bookmark submodule) or (directory submodule) or value “separator” (singular enum))) convertible to it) convertible to it

Default:

{ }

Declared by:

programs.librewolf.profiles.<name>.bookmarks.configFile

Configuration file to define custom bookmarks.

Type: null or absolute path

Default:

null

Declared by:

programs.librewolf.profiles.<name>.bookmarks.force

Whether to force override existing custom bookmarks.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.bookmarks.meta.maintainers

List of maintainers of each module. This option should be defined at most once per module.

The option value is not a list of maintainers, but an attribute set that maps module file names to lists of maintainers.

Type: list of lib.maintainers

Default:

[ ]

Example:

[ lib.maintainers.alice lib.maintainers.bob ]

Declared by:

programs.librewolf.profiles.<name>.bookmarks.meta.teams

List of team maintainers of each module. This option should be defined at most once per module.

Type: list of lib.teams

Default:

[ ]

Example:

[ lib.teams.acme lib.teams.haskell ]

Declared by:

programs.librewolf.profiles.<name>.bookmarks.settings

Custom bookmarks.

Type: (list of ((bookmark submodule) or (directory submodule) or value “separator” (singular enum))) or (attribute set of ((bookmark submodule) or (directory submodule) or value “separator” (singular enum))) convertible to it

Default:

[ ]

Example:

[
  {
    name = "wikipedia";
    tags = [ "wiki" ];
    keyword = "wiki";
    url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
  }
  {
    name = "kernel.org";
    url = "https://www.kernel.org";
  }
  "separator"
  {
    name = "Nix sites";
    toolbar = true;
    bookmarks = [
      {
        name = "homepage";
        url = "https://nixos.org/";
      }
      {
        name = "wiki";
        tags = [ "wiki" "nix" ];
        url = "https://wiki.nixos.org/";
      }
    ];
  }
]

Declared by:

programs.librewolf.profiles.<name>.containers

Attribute set of container configurations. See Multi-Account Containers for more information.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  dangerous = {
    color = "red";
    icon = "fruit";
    id = 2;
  };
  shopping = {
    color = "blue";
    icon = "cart";
    id = 1;
  };
}

Declared by:

programs.librewolf.profiles.<name>.containers.<name>.color

Container color.

Type: one of “blue”, “turquoise”, “green”, “yellow”, “orange”, “red”, “pink”, “purple”, “toolbar”

Default:

"pink"

Declared by:

programs.librewolf.profiles.<name>.containers.<name>.icon

Container icon.

Type: one of “briefcase”, “cart”, “circle”, “dollar”, “fence”, “fingerprint”, “gift”, “vacation”, “food”, “fruit”, “pet”, “tree”, “chill”

Default:

"fruit"

Declared by:

programs.librewolf.profiles.<name>.containers.<name>.id

Container ID. This should be set to a unique number per container in this profile.

Type: unsigned integer, meaning >=0

Default:

1

Declared by:

programs.librewolf.profiles.<name>.containers.<name>.name

Container name, e.g., shopping.

Type: string

Default:

"‹name›"

Declared by:

programs.librewolf.profiles.<name>.containersForce

Whether to force replace the existing containers configuration. This is recommended since LibreWolf will replace the symlink on every launch, but note that you’ll lose any existing configuration by enabling this.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.extensions

Submodule for installing and configuring extensions.

Type: submodule

Default:

{ }

Example:

{
  packages = with pkgs.nur.repos.rycee.firefox-addons; [
    ublock-origin
  ];
  settings."uBlock0@raymondhill.net".settings = {
    selectedFilterLists = [
      "ublock-filters"
      "ublock-badware"
      "ublock-privacy"
      "ublock-unbreak"
      "ublock-quick-fixes"
    ];
  };
}

Declared by:

programs.librewolf.profiles.<name>.extensions.packages

List of ‹name› add-on packages to install for this profile. Some pre-packaged add-ons are accessible from the Nix User Repository. Once you have NUR installed run

$ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons

to list the available ‹name› add-ons.

Note that it is necessary to manually enable these extensions inside ‹name› after the first installation.

To automatically enable extensions add "extensions.autoDisableScopes" = 0; to programs.librewolf.profiles.<profile>.settings

On systems using impermanence, this only prevents ‹name› from requiring manual extension approval. It does not preserve extension runtime state such as extension UUIDs, logins, local storage, or per-extension data. Persist the ‹name› profile state needed by your extensions, or configure supported extension settings declaratively with programs.librewolf.profiles.<profile>.extensions.settings.

Persisting only the extensions directory is generally not sufficient, because ‹name› stores extension state in other profile files and databases that are managed outside Home Manager.

Type: list of package

Default:

[ ]

Example:

with pkgs.nur.repos.rycee.firefox-addons; [
  privacy-badger
]

Declared by:

programs.librewolf.profiles.<name>.extensions.exactPermissions

When enabled, programs.librewolf.profiles.<profile>.extensions.settings.<extensionID>.permissions must specify the exact set of permissions that the extension will request.

This means that if the authorized permissions are broader than what the extension requests, the assertion will fail.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.librewolf.profiles.<name>.extensions.exhaustivePermissions

When enabled, the user must authorize requested permissions for all extensions from programs.librewolf.profiles.<profile>.extensions.packages in programs.librewolf.profiles.<profile>.extensions.settings.<extensionID>.permissions

Type: boolean

Default:

false

Example:

true

Declared by:

programs.librewolf.profiles.<name>.extensions.force

Whether to override all previous firefox settings.

This is required when using settings.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.librewolf.profiles.<name>.extensions.settings

Attribute set of options for each extension. The keys of the attribute set consist of the ID of the extension or its UUID wrapped in curly braces.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  # Example with uBlock origin's extensionID
  "uBlock0@raymondhill.net".settings = {
    selectedFilterLists = [
      "ublock-filters"
      "ublock-badware"
      "ublock-privacy"
      "ublock-unbreak"
      "ublock-quick-fixes"
    ];
  };

  # Example with Stylus' UUID-form extensionID
  "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}".settings = {
    dbInChromeStorage = true; # required for Stylus
  }
}

Declared by:

programs.librewolf.profiles.<name>.extensions.settings.<name>.force

Forcibly override any existing configuration for this extension.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.librewolf.profiles.<name>.extensions.settings.<name>.permissions

Allowed permissions for this extension. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions for a list of relevant permissions.

Type: null or (list of string)

Default:

"Any permissions"

Example:

[
  "activeTab"
]

Declared by:

programs.librewolf.profiles.<name>.extensions.settings.<name>.settings

Json formatted options for this extension.

Type: attribute set of (JSON value)

Default:

{ }

Declared by:

programs.librewolf.profiles.<name>.extraConfig

Extra preferences to add to user.js.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.librewolf.profiles.<name>.handlers

Declarative handlers configuration for MIME types and URL schemes.

Type: submodule

Default:

{ }

Declared by:

programs.librewolf.profiles.<name>.handlers.force

Whether to force replace the existing handlers configuration.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.handlers.meta.maintainers

List of maintainers of each module. This option should be defined at most once per module.

The option value is not a list of maintainers, but an attribute set that maps module file names to lists of maintainers.

Type: list of lib.maintainers

Default:

[ ]

Example:

[ lib.maintainers.alice lib.maintainers.bob ]

Declared by:

programs.librewolf.profiles.<name>.handlers.meta.teams

List of team maintainers of each module. This option should be defined at most once per module.

Type: list of lib.teams

Default:

[ ]

Example:

[ lib.teams.acme lib.teams.haskell ]

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes

Attribute set mapping MIME types to their handler configurations.

For a configuration example, see this file on Firefox’s source code.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  "application/pdf" = {
    action = 2;
    ask = false;
    handlers = [
      {
        name = "Okular";
        path = "${pkgs.okular}/bin/okular";
      }
    ];
    extensions = [ "pdf" ];
  };
}

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.action

The action to take for this MIME type / URL scheme. Possible values:

  • 0: Save file
  • 1: Always ask
  • 2: Use helper app
  • 3: Open in LibreWolf
  • 4: Use system default

Type: one of 0, 1, 2, 3, 4

Default:

1

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.ask

If true, the user is asked what they want to do with the file. If false, the action is taken without user intervention.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.extensions

List of file extensions associated with this MIME type.

Type: list of string matching the pattern ^[^\.].+$

Default:

[ ]

Example:

[
  "jpg"
  "jpeg"
]

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.handlers

An array of handlers with the first one being the default. If you don’t want to have a default handler, use an empty object for the first handler. Only valid when action is set to 2 (Use helper app).

Type: list of (submodule)

Default:

[ ]

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.handlers.*.name

Display name of the handler.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.handlers.*.path

Path to the executable to be used.

Only one of ‘path’ or ‘uriTemplate’ should be set.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.handlers.mimeTypes.<name>.handlers.*.uriTemplate

URI for the application handler.

Only one of ‘path’ or ‘uriTemplate’ should be set.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes

Attribute set mapping URL schemes to their handler configurations.

For a configuration example, see this file on Firefox’s source code.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  mailto = {
    action = 2;
    ask = false;
    handlers = [
      {
        name = "Gmail";
        uriTemplate = "https://mail.google.com/mail/?extsrc=mailto&url=%s";
      }
    ];
  };
}

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.action

The action to take for this MIME type / URL scheme. Possible values:

  • 0: Save file
  • 1: Always ask
  • 2: Use helper app
  • 3: Open in LibreWolf
  • 4: Use system default

Type: one of 0, 1, 2, 3, 4

Default:

1

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.ask

If true, the user is asked what they want to do with the file. If false, the action is taken without user intervention.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.handlers

An array of handlers with the first one being the default. If you don’t want to have a default handler, use an empty object for the first handler. Only valid when action is set to 2 (Use helper app).

Type: list of (submodule)

Default:

[ ]

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.handlers.*.name

Display name of the handler.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.handlers.*.path

Path to the executable to be used.

Only one of ‘path’ or ‘uriTemplate’ should be set.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.handlers.schemes.<name>.handlers.*.uriTemplate

URI for the application handler.

Only one of ‘path’ or ‘uriTemplate’ should be set.

Type: null or string

Default:

null

Declared by:

programs.librewolf.profiles.<name>.id

Profile ID. This should be set to a unique number per profile.

Type: unsigned integer, meaning >=0

Default:

0

Declared by:

programs.librewolf.profiles.<name>.isDefault

Whether this is a default profile.

Type: boolean

Default:

"true if profile ID is 0"

Declared by:

programs.librewolf.profiles.<name>.name

Profile name.

Type: string

Default:

"‹name›"

Declared by:

programs.librewolf.profiles.<name>.path

Profile path.

Type: string

Default:

"‹name›"

Declared by:

programs.librewolf.profiles.<name>.preConfig

Extra preferences to add to user.js, before .

Use , unless you want to overwrite in , then use this option.

Type: strings concatenated with “\n”

Default:

""

Declared by:

programs.librewolf.profiles.<name>.search

Declarative search engine configuration.

Type: submodule

Default:

{ }

Declared by:

programs.librewolf.profiles.<name>.search.default

The default search engine used in the address bar and search bar.

Type: null or string

Default:

null

Example:

"ddg"

Declared by:

programs.librewolf.profiles.<name>.search.engines

Attribute set of search engine configurations. Engines that only have metaData specified will be treated as builtin to LibreWolf.

See SearchEngine.jsm in LibreWolf’s source for available options. We maintain a mapping to let you specify all options in the referenced link without underscores, but it may fall out of date with future options.

Note, icon is also a special option added by Home Manager to make it convenient to specify absolute icon paths.

Type: attribute set of attribute set of (JSON value)

Default:

{ }

Example:

{
  nix-packages = {
    name = "Nix Packages";
    urls = [{
      template = "https://search.nixos.org/packages";
      params = [
        { name = "type"; value = "packages"; }
        { name = "query"; value = "{searchTerms}"; }
      ];
    }];

    icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
    definedAliases = [ "@np" ];
  };

  nixos-wiki = {
    name = "NixOS Wiki";
    urls = [{ template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; }];
    iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
    definedAliases = [ "@nw" ];
  };

  bing.metaData.hidden = true;
  google.metaData.alias = "@g"; # builtin engines only support specifying one additional alias
}

Declared by:

programs.librewolf.profiles.<name>.search.force

Whether to force replace the existing search configuration. This is recommended since LibreWolf will replace the symlink for the search configuration on every launch, but note that you’ll lose any existing configuration by enabling this.

Type: boolean

Default:

false

Declared by:

programs.librewolf.profiles.<name>.search.meta.maintainers

List of maintainers of each module. This option should be defined at most once per module.

The option value is not a list of maintainers, but an attribute set that maps module file names to lists of maintainers.

Type: list of lib.maintainers

Default:

[ ]

Example:

[ lib.maintainers.alice lib.maintainers.bob ]

Declared by:

programs.librewolf.profiles.<name>.search.meta.teams

List of team maintainers of each module. This option should be defined at most once per module.

Type: list of lib.teams

Default:

[ ]

Example:

[ lib.teams.acme lib.teams.haskell ]

Declared by:

programs.librewolf.profiles.<name>.search.order

The order the search engines are listed in. Any engines that aren’t included in this list will be listed after these in an unspecified order.

Type: list of string

Default:

[ ]

Example:

[
  "ddg"
  "google"
]

Declared by:

programs.librewolf.profiles.<name>.search.privateDefault

The default search engine used in the Private Browsing.

Type: null or string

Default:

null

Example:

"ddg"

Declared by:

programs.librewolf.profiles.<name>.settings

Attribute set of LibreWolf preferences.

LibreWolf only supports int, bool, and string types for preferences, but home-manager will automatically convert all other JSON-compatible values into strings.

Type: attribute set of (LibreWolf preference (int, bool, string, and also attrs, list, float as a JSON string))

Default:

{ }

Example:

{
  "browser.startup.homepage" = "https://nixos.org";
  "browser.search.region" = "GB";
  "browser.search.isUS" = false;
  "distribution.searchplugins.defaultLocale" = "en-GB";
  "general.useragent.locale" = "en-GB";
  "browser.bookmarks.showMobileBookmarks" = true;
  "browser.newtabpage.pinned" = [{
    title = "NixOS";
    url = "https://nixos.org";
  }];
}

Declared by:

programs.librewolf.profiles.<name>.userChrome

Custom LibreWolf user chrome CSS.

Type: strings concatenated with “\n” or absolute path

Default:

""

Example:

''
  /* Hide tab bar in FF Quantum */
  @-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) {
    #TabsToolbar {
      visibility: collapse !important;
      margin-bottom: 21px !important;
    }
  
    #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
      visibility: collapse !important;
    }
  }
''

Declared by:

programs.librewolf.profiles.<name>.userContent

Custom LibreWolf user content CSS.

Type: strings concatenated with “\n” or absolute path

Default:

""

Example:

''
  /* Hide scrollbar in FF Quantum */
  *{scrollbar-width:none !important}
''

Declared by:

programs.librewolf.settings

Attribute set of global LibreWolf settings and overrides. Refer to https://librewolf.net/docs/settings/ for details on supported values.

Type: attribute set of (boolean or signed integer or string)

Default:

{ }

Example:

{
  "privacy.resistFingerprinting" = false;
  "webgl.disabled" = false;
}

Declared by: