8f9eff1640
Move librewolf out of the bare package list into its own module declaring `local.librewolf.package` (default pkgs.librewolf), mirroring texlive. Lets a consumer swap the wrapped package — extraPolicies/extraPrefs — to share extensions and an about:config baseline across profiles without editing the module. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.5 KiB
Nix
36 lines
1.5 KiB
Nix
# LibreWolf browser. The package is an option so a consumer can swap the wrapped
|
|
# package without editing this module: the base is plain pkgs.librewolf, but the
|
|
# wrapper (wrapFirefox) accepts `extraPolicies` and `extraPrefs`, and overriding
|
|
# those is the clean way to manage LibreWolf declaratively.
|
|
#
|
|
# The useful case is sharing state across LibreWolf profiles that otherwise stay
|
|
# separate (each `-P <name>` has its own history/logins/cookies). Enterprise
|
|
# policy `ExtensionSettings` force- or normal-installs the same add-ons into
|
|
# every profile, and `extraPrefs` (autoconfig `defaultPref`/`lockPref`) seeds a
|
|
# shared about:config baseline — both applied per-launch, neither touching
|
|
# per-profile user data. Override, e.g.:
|
|
#
|
|
# local.librewolf.package = pkgs.librewolf.override {
|
|
# extraPolicies.ExtensionSettings."uBlock0@raymondhill.net" = {
|
|
# installation_mode = "normal_installed";
|
|
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
|
# };
|
|
# extraPrefs = ''defaultPref("browser.startup.page", 3);'';
|
|
# };
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
options.local.librewolf.package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = pkgs.librewolf;
|
|
defaultText = lib.literalExpression "pkgs.librewolf";
|
|
description = ''
|
|
LibreWolf package. Override with
|
|
`pkgs.librewolf.override { extraPolicies = …; extraPrefs = …; }`
|
|
to share extensions/settings across profiles.
|
|
'';
|
|
};
|
|
|
|
config.home.packages = [ config.local.librewolf.package ];
|
|
}
|