97 lines
2.4 KiB
Nix
97 lines
2.4 KiB
Nix
{
|
|
inputs,
|
|
config,
|
|
pkgs,
|
|
system,
|
|
...
|
|
}:
|
|
|
|
{
|
|
programs.zen-browser = {
|
|
enable = true;
|
|
nativeMessagingHosts = [ pkgs.firefoxpwa ];
|
|
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;
|
|
};
|
|
};
|
|
profiles.default = {
|
|
containersForce = true;
|
|
containers = {
|
|
Personal = {
|
|
color = "purple";
|
|
icon = "fingerprint";
|
|
id = 1;
|
|
};
|
|
};
|
|
spacesForce = true;
|
|
spaces =
|
|
let
|
|
containers = config.programs.zen-browser.profiles."default".containers;
|
|
in
|
|
{
|
|
"Space" = {
|
|
id = "c6de089c-410d-4206-961d-ab11f988d40a";
|
|
position = 1000;
|
|
container = containers."Personal".id;
|
|
};
|
|
};
|
|
extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
|
|
ublock-origin
|
|
dearrow
|
|
"bitwarden-2025.11.2"
|
|
"sponsorblock-6.1.0"
|
|
];
|
|
};
|
|
};
|
|
|
|
xdg.mimeApps =
|
|
let
|
|
value =
|
|
let
|
|
zen-browser = inputs.zen-browser.packages.${system}.beta; # or twilight
|
|
in
|
|
zen-browser.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;
|
|
};
|
|
}
|