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

22 lines
609 B
Nix
Raw Normal View History

{ pkgs, lib, ... }:
2024-04-16 02:51:46 +03:00
let
2024-04-18 18:18:53 +03:00
policiesJson = pkgs.callPackage ./policies.nix { };
2024-04-16 02:51:46 +03:00
torBrowser = (pkgs.tor-browser-bundle-bin.override {
mediaSupport = true;
pulseaudioSupport = true;
}).overrideAttrs (attrs: {
postInstall = ''
rm $out/share/tor-browser/distribution/policies.json
install -Dvm644 ${policiesJson} $out/share/tor-browser/distribution/policies.json
'';
});
in
{
options.local.programs.browsers.tor-browser = with lib; {
enable = mkEnableOption "tor-browser";
package = mkPackageOption pkgs "tor-browser-bundle-bin" {} // { default = torBrowser; };
2024-04-16 02:51:46 +03:00
};
}