nix/common/dotfiles/firefox.nix
2023-07-02 22:30:30 +09:00

81 lines
3.1 KiB
Nix

{ config, pkgs, ... }: {
pkgs.firefox.override (args: args // {
extraPrefs = ''
lockPref("extension.pocket.enabled", false);
lockPref("toolkit.telemetry.pioneer-new-studies-availble", false);
lockPref("datareporting.healthreport.uploadEnabled", false);
lockPref("datareporting.healthreport.infoURL", null);
lockPref("toolkit.telemetry.server", null);
lockPref("browser.newtabpage.activity-stream.feeds.telemetry", false);
lockPref("browser.newtabpage.activity-stream.telemetry", false);
lockPref("browser.ping-centre.telemetry", false);
lockPref("toolkit.telemetry.enabled", false);
lockPref("toolkit.telemetry.firstShutdownPing.enabled", false);
lockPref("toolkit.telemetry.hybridContent.enabled", false);
lockPref("toolkit.telemetry.newProfilePing.enabled", false);
lockPref("toolkit.telemetry.shutdownPingSender.enabled", false);
lockPref("toolkit.telemetry.updatePing.enabled", false);
lockPref("toolkit.telemetry.reportingpolicy.firstRun", false);
lockPref("toolkit.telemetry.unified", false);
lockPref("toolkit.telemetry.archive.enabled", false);
lockPref("devtools.onboarding.telemetry.logged", false);
lockPref("toolkit.telemetry.bhrPing.enabled", false);
lockPref("datareporting.policy.dataSubmissionEnabled", false);
lockPref("datareporting.sessions.current.clean", true);
lockPref("browser.startup.homepage", https://dir.sysctl.io);
lockPref("browser.search.region", US);
lockPref("browser.search.isUS", false;
lockPref("distribution.searchplugins.defaultLocale", en-US);
lockPref("general.useragent.locale", en-US);
lockPref("browser.bookmarks.showMobileBookmarks", false);
lockPref("browser.newtabpage.enabled", false);
lockPref("services.sync.prefs.sync.browser.newtabpage.enabled", false);
''
};
programs.firefox = {
enable = true;
profiles.default = {
isDefault = true;
name = "default";
# https://nur.nix-community.org/repos/rycee/
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger
decentraleyes
darkreader
ublock-origin
privacy-redirect
link-cleaner
demodal
];
search.default = "DuckDuckGo";
search.force = true;
search.order = [ "DuckDuckGo" ];
search.engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
};
};
};
}