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 { in {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true; DisableTelemetry = true;
DisablePocket = true; DisablePocket = true;
DisableFeedbackCommands = true; DisableFeedbackCommands = true;
@ -23,7 +24,6 @@ in {
SearchSuggestEnabled = true; SearchSuggestEnabled = true;
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163 # 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 = { "3rdparty".Extensions = {
"addon@darkreader.org" = { "addon@darkreader.org" = {
permissions = ["internal:privateBrowsingAllowed"]; permissions = ["internal:privateBrowsingAllowed"];
@ -53,6 +53,40 @@ in {
uiTheme = "dark"; uiTheme = "dark";
advancedUserEnabled = true; advancedUserEnabled = true;
userFiltersTrusted = 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 ublock-origin
violentmonkey violentmonkey
]; ];
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix # https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
search = { search = {
default = "SearxNG"; default = "SearxNG";