system/modules/nixos/programs/browsers/mullvad-browser.nix

24 lines
725 B
Nix

{ pkgs, lib, inputs, ... }:
let
policiesJson = pkgs.callPackage ./policies.nix {
firefoxAddons = inputs.firefox-addons.packages."${pkgs.system}";
withRedirectorAddon = true;
withSidebarTabsAddon = true;
withAllSearchEngines = 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";
package = mkPackageOption pkgs "mullvad-browser" {} // { default = mullvadBrowser; };
};
}