28 lines
785 B
Nix
28 lines
785 B
Nix
|
{ config, pkgs, lib, inputs, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.local.programs.browsers.librewolf;
|
||
|
isPassEnabled = config.local.programs.pass.enable;
|
||
|
|
||
|
policiesJson = pkgs.callPackage ./policies.nix {
|
||
|
firefoxAddons = inputs.firefox-addons.packages."${pkgs.system}";
|
||
|
withPassffAddon = isPassEnabled;
|
||
|
withRedirectorAddon = true;
|
||
|
withSidebarTabsAddon = true;
|
||
|
};
|
||
|
|
||
|
librewolf' = with pkgs.unstable; librewolf.override {
|
||
|
extraPoliciesFiles = librewolf.unwrapped.extraPoliciesFiles ++ [ policiesJson ];
|
||
|
nativeMessagingHosts = lib.optional isPassEnabled passff-host;
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
options.local.programs.browsers.librewolf = with lib; {
|
||
|
enable = mkEnableOption "librewolf";
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
environment.systemPackages = [ librewolf' ];
|
||
|
};
|
||
|
}
|