139 lines
4.7 KiB
Nix
139 lines
4.7 KiB
Nix
![]() |
{
|
||
|
lib,
|
||
|
inputs,
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
inherit (lib) getFlakePkg';
|
||
|
zen-browser = getFlakePkg' inputs.zen-browser-flake "beta";
|
||
|
inherit (lib.modules) mkForce;
|
||
|
in
|
||
|
{
|
||
|
programs.firefox = {
|
||
|
enable = true;
|
||
|
package = zen-browser;
|
||
|
languagePacks = [
|
||
|
"de"
|
||
|
"en-US"
|
||
|
"ru"
|
||
|
];
|
||
|
policies = {
|
||
|
# Updates & Background Services
|
||
|
AppAutoUpdate = false;
|
||
|
BackgroundAppUpdate = false;
|
||
|
|
||
|
# Feature Disabling
|
||
|
DisableBuiltinPDFViewer = false;
|
||
|
DisableFirefoxStudies = true;
|
||
|
DisableFirefoxAccounts = true;
|
||
|
DisableFirefoxScreenshots = true;
|
||
|
DisableForgetButton = true;
|
||
|
DisableMasterPasswordCreation = true;
|
||
|
DisableProfileImport = true;
|
||
|
DisableProfileRefresh = true;
|
||
|
DisableSetDesktopBackground = true;
|
||
|
DisablePocket = true;
|
||
|
DisableTelemetry = true;
|
||
|
DisableFormHistory = true;
|
||
|
DisablePasswordReveal = true;
|
||
|
|
||
|
# Access Restrictions
|
||
|
BlockAboutConfig = false;
|
||
|
BlockAboutProfiles = true;
|
||
|
BlockAboutSupport = true;
|
||
|
|
||
|
# UI and Behavior
|
||
|
DisplayMenuBar = "never";
|
||
|
DontCheckDefaultBrowser = true;
|
||
|
HardwareAcceleration = true;
|
||
|
OfferToSaveLogins = false;
|
||
|
|
||
|
# Extensions
|
||
|
ExtensionSettings =
|
||
|
let
|
||
|
moz = short: "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi";
|
||
|
in
|
||
|
{
|
||
|
# Block all extensions by default.
|
||
|
"*".installation_mode = "blocked";
|
||
|
|
||
|
"uBlock0@raymondhill.net" = {
|
||
|
install_url = moz "ublock-origin";
|
||
|
installation_mode = "force_installed";
|
||
|
updates_disabled = true;
|
||
|
};
|
||
|
|
||
|
"{73a6fe31-595d-460b-a920-fcc0f8843232}" = {
|
||
|
install_url = moz "noscript";
|
||
|
installation_mode = "force_installed";
|
||
|
updates_disabled = true;
|
||
|
};
|
||
|
|
||
|
"3rdparty".Extensions = {
|
||
|
"uBlock0@raymondhill.net".adminSettings = {
|
||
|
userSettings = rec {
|
||
|
uiTheme = "dark";
|
||
|
uiAccentCustom = true;
|
||
|
uiAccentCustom0 = "#8300ff";
|
||
|
cloudStorageEnabled = mkForce false;
|
||
|
|
||
|
importedLists = [
|
||
|
"https:#filters.adtidy.org/extension/ublock/filters/3.txt"
|
||
|
"https:#github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||
|
|
||
|
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/privacy_essentials.txt"
|
||
|
"https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/adblock/pro.plus.mini.txt"
|
||
|
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/LegitimateURLShortener.txt"
|
||
|
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/annoyance_list.txt"
|
||
|
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/BrowseWebsitesWithoutLoggingIn.txt"
|
||
|
];
|
||
|
|
||
|
externalLists = lib.concatStringsSep "\n" importedLists;
|
||
|
};
|
||
|
|
||
|
selectedFilterLists = [
|
||
|
"CZE-0"
|
||
|
"adguard-generic"
|
||
|
"adguard-annoyance"
|
||
|
"adguard-social"
|
||
|
"adguard-spyware-url"
|
||
|
"easylist"
|
||
|
"easyprivacy"
|
||
|
"https:#github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||
|
"plowe-0"
|
||
|
"ublock-abuse"
|
||
|
"ublock-badware"
|
||
|
"ublock-filters"
|
||
|
"ublock-privacy"
|
||
|
"ublock-quick-fixes"
|
||
|
"ublock-unbreak"
|
||
|
"urlhaus-1"
|
||
|
|
||
|
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/privacy_essentials.txt"
|
||
|
"https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/adblock/pro.plus.mini.txt"
|
||
|
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/LegitimateURLShortener.txt"
|
||
|
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/annoyance_list.txt"
|
||
|
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/BrowseWebsitesWithoutLoggingIn.txt"
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
SearchEngines = {
|
||
|
Add = [
|
||
|
{
|
||
|
"Name" = "Kagi";
|
||
|
"URLTemplate" = "https://kagi.com/search?q={searchTerms}";
|
||
|
"Method" = "'GET' | 'POST'";
|
||
|
"IconURL" = "https://www.example.org/favicon.ico";
|
||
|
"Alias" = "Kagi";
|
||
|
"Description" = "Kagi search engine";
|
||
|
"PostData" = "name=value&q={searchTerms}";
|
||
|
"SuggestURLTemplate" = "https://kagi.com/api/autosuggest?q={searchTerms}";
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|