2024-10-09 21:52:12 +03:00
|
|
|
{ config, pkgs, lib, inputs, ... }:
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
let
|
2024-10-09 21:52:12 +03:00
|
|
|
cfg = config.local.programs.browsers.librewolf;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
policiesJson = pkgs.callPackage ./policies.nix {
|
|
|
|
firefoxAddons = inputs.firefox-addons.packages."${pkgs.system}";
|
|
|
|
withRedirectorAddon = true;
|
|
|
|
withSidebarTabsAddon = true;
|
2024-04-18 18:18:53 +03:00
|
|
|
withAllSearchEngines = true;
|
2024-04-16 02:51:46 +03:00
|
|
|
};
|
|
|
|
|
2024-10-09 21:52:12 +03:00
|
|
|
finalLibrewolf = cfg.package.override {
|
|
|
|
extraPoliciesFiles = cfg.package.unwrapped.extraPoliciesFiles ++ [ policiesJson ];
|
2024-04-16 02:51:46 +03:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.local.programs.browsers.librewolf = with lib; {
|
|
|
|
enable = mkEnableOption "librewolf";
|
2024-10-09 21:52:12 +03:00
|
|
|
package = mkPackageOption pkgs "librewolf" {};
|
|
|
|
finalPackage = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
readOnly = true;
|
|
|
|
default = finalLibrewolf;
|
|
|
|
};
|
2024-04-16 02:51:46 +03:00
|
|
|
};
|
|
|
|
}
|