Files
nix-home-manager/home/zen-browser.nix

68 lines
1.7 KiB
Nix

{ config, pkgs, lib, zen-browser, ... }:
let
cfg = config.homeModules.zenbrowser;
in
lib.mkIf cfg.enable {
imports = [
# You can choose one of the following:
# inputs.zen-browser.homeModules.beta
# inputs.zen-browser.homeModules.twilight
zen-browser.homeModules.twilight-official
];
programs.zen-browser = {
enable = true;
policies = {
AutofillAddressEnabled = true;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
};
nativeMessagingHosts = [
pkgs.firefoxpwa
];
};
xdg.mimeApps = let
value = inputs.zen-browser.packages.${pkgs.system}.twilight.meta.desktopFileName;
associations = builtins.listToAttrs (map (name: {
inherit name value;
}) [
"application/x-extension-shtml"
"application/x-extension-xhtml"
"application/x-extension-html"
"application/x-extension-xht"
"application/x-extension-htm"
"x-scheme-handler/unknown"
"x-scheme-handler/mailto"
"x-scheme-handler/chrome"
"x-scheme-handler/about"
"x-scheme-handler/https"
"x-scheme-handler/http"
"application/xhtml+xml"
"application/json"
"text/plain"
"text/html"
]);
in {
associations.added = associations;
defaultApplications = associations;
};
}