29 lines
759 B
Nix
29 lines
759 B
Nix
|
{ config, pkgs, lib, inputs, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.local.programs.browsers.mullvad-browser;
|
||
|
|
||
|
policiesJson = pkgs.callPackage ./policies.nix {
|
||
|
firefoxAddons = inputs.firefox-addons.packages."${pkgs.system}";
|
||
|
withRedirectorAddon = true;
|
||
|
withSidebarTabsAddon = true;
|
||
|
};
|
||
|
|
||
|
mullvadBrowser = pkgs.mullvad-browser.overrideAttrs (attrs: {
|
||
|
postInstall = ''
|
||
|
rm $out/share/mullvad-browser/distribution/policies.json
|
||
|
|
||
|
install -Dvm644 ${policiesJson} $out/share/mullvad-browser/distribution/policies.json
|
||
|
'';
|
||
|
});
|
||
|
in
|
||
|
{
|
||
|
options.local.programs.browsers.mullvad-browser = with lib; {
|
||
|
enable = mkEnableOption "mullvad-browser";
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
environment.systemPackages = [ mullvadBrowser ];
|
||
|
};
|
||
|
}
|