programs/browsers/firefox: move policies to wrapFirefox (make it rebuild itself)

This commit is contained in:
Anthony Rodriguez 2024-10-24 18:22:36 +02:00
parent 1745932cd8
commit 7bf11e55b6
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -12,7 +12,8 @@
in {
programs.firefox = {
enable = true;
policies = {
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
DisablePocket = true;
DisableFeedbackCommands = true;
@ -23,7 +24,6 @@ in {
SearchSuggestEnabled = true;
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
# TODO: declare which block lists are needed
"3rdparty".Extensions = {
"addon@darkreader.org" = {
permissions = ["internal:privateBrowsingAllowed"];
@ -53,6 +53,40 @@ in {
uiTheme = "dark";
advancedUserEnabled = true;
userFiltersTrusted = true;
importedLists = [
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
selectedFilterLists = [
"FRA-0"
"adguard-cookies"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-social"
"adguard-spyware-url"
"adguard-widgets"
"easylist"
"easylist-annoyances"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easyprivacy"
"fanboy-cookiemonster"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
"plowe-0"
"ublock-annoyances"
"ublock-badware"
"ublock-cookies-adguard"
"ublock-cookies-easylist"
"ublock-filters"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"urlhaus-1"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
};
};
};
};
@ -73,7 +107,6 @@ in {
ublock-origin
violentmonkey
];
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
search = {
default = "SearxNG";