firefox.nix (4948B)
1 { pkgs, ... }: 2 3 { 4 programs.firefox = { 5 enable = true; 6 # Temporary fix 7 # https://github.com/nix-community/home-manager/issues/1641 8 # (https://github.com/NixOS/nixpkgs/pull/105796) 9 package = pkgs.wrapFirefox pkgs.firefox-unwrapped { 10 extraPolicies = { 11 ExtensionSettings = { }; 12 CaptivePortal = false; 13 DisableFirefoxStudies = true; 14 DisablePocket = true; 15 DisableTelemetry = true; 16 # DisableFirefoxAccounts = true; 17 FirefoxHome = { 18 Pocket = false; 19 # Snippets = false; 20 }; 21 UserMessaging = { 22 ExtensionRecommendations = false; 23 SkipOnboarding = true; 24 }; 25 }; 26 }; 27 profiles.default = { 28 id = 0; 29 isDefault = true; 30 settings = { 31 "general.warnOnAboutConfig" = false; 32 "browser.aboutConfig.showWarning" = false; 33 # It keeps asking me on startup if I want firefox as default 34 "browser.shell.checkDefaultBrowser" = false; 35 # Disable pocket 36 "extensions.pocket.enabled" = false; 37 "extensions.pocket.site" = ""; 38 "extensions.pocket.oAuthConsumerKey" = ""; 39 "extensions.pocket.api" = ""; 40 "extensions.htmlaboutaddons.recommendations.enabled" = false; 41 # performance 42 "browser.download.animateNotifications" = false; 43 "browser.tabs.animate" = false; 44 "toolkit.cosmeticAnimations.enabled" = false; 45 "html5.offmainthread" = true; 46 "layers.acceleration.force-enabled" = true; 47 "layers.async-video.enabled" = true; 48 "layers.offmainthreadcomposition.async-animations" = true; 49 "layers.offmainthreadcomposition.enabled" = true; 50 "layout.frame_rate.precise" = true; 51 "webgl.force-enabled" = true; 52 "gfx.xrender.enabled" = true; 53 "gfx.webrender.all" = true; 54 "gfx.webrender.enable" = true; 55 # Misc 56 "privacy.donottrackheader.enabled" = true; 57 # "privacy.firstparty.isolate" = true; 58 #"privacy.resistFingerprinting" = true; 59 "privacy.trackingprotection.cryptomining.enabled" = true; 60 "privacy.trackingprotection.enabled" = true; 61 "privacy.trackingprotection.fingerprinting.enabled" = true; 62 "privacy.trackingprotection.socialtracking.enabled" = true; 63 # FIXME(vdemeester) Enable thoses 64 #"privacy.clearOnShutdown.history" = true; 65 #"privacy.clearOnShutdown.siteSettings" = true; 66 "browser.formfill.enable" = false; 67 "browser.newtabpage.activity-stream.feeds.telemetry" = false; 68 "browser.newtabpage.activity-stream.telemetry" = false; 69 "browser.ping-centre.telemetry" = false; 70 "browser.safebrowsing.enabled" = false; 71 "browser.search.geoip.url" = ""; 72 "browser.selfsupport.url" = ""; 73 "browser.send_pings" = false; 74 "browser.send_pings.require_same_host" = true; 75 "browser.sessionstore.privacy_level" = 2; 76 "browser.startup.homepage_override.buildID" = ""; 77 "browser.startup.homepage_override.mstone" = "ignore"; 78 "browser.urlbar.speculativeConnect.enabled" = false; 79 "browser.contentblocking.category" = "strict"; 80 "browser.ctrlTab.recentlyUsedOrder" = false; 81 "network.dns.disablePrefetch" = true; 82 "network.dnsCacheEntries" = 100; 83 "network.dnsCacheExpiration" = 60; 84 #"network.http.referer.XOriginPolicy" = 2; 85 #"network.http.referer.XOriginTrimmingPolicy" = 2; 86 #"network.http.referer.spoofSource" = true; 87 "network.http.sendRefererHeader" = 2; 88 #"network.http.sendSecureXSiteReferrer" = false; 89 #"network.http.speculative-parallel-limit" = 0; 90 "network.predictor.enabled" = false; 91 "network.prefetch-next" = false; 92 "media.peerconnection.enabled" = false; 93 "media.peerconnection.turn.disable" = true; 94 "media.peerconnection.video.enabled" = false; 95 "media.peerconnection.identity.timeout" = 1; 96 "dom.battery.enabled" = false; 97 # "dom.event.clipboardevents.enabled" = false; 98 "dom.event.contextmenu.enabled" = false; 99 "toolkit.telemetry.archive.enabled" = false; 100 "toolkit.telemetry.bhrPing.enabled" = false; 101 "toolkit.telemetry.cachedClientID" = ""; 102 "toolkit.telemetry.enabled" = false; 103 "toolkit.telemetry.firstShutdownPing.enabled" = false; 104 "toolkit.telemetry.hybridContent.enabled" = false; 105 "toolkit.telemetry.newProfilePing.enabled" = false; 106 "toolkit.telemetry.reportingpolicy.firstRun" = false; 107 "toolkit.telemetry.server" = ""; 108 "toolkit.telemetry.shutdownPingSender.enabled" = false; 109 "toolkit.telemetry.unified" = false; 110 "toolkit.telemetry.updatePing.enabled" = false; 111 # Red Hat specific 112 "network.negotiate-auth.trusted-uris" = ".redhat.com"; 113 }; 114 }; 115 profiles.redhat = { 116 id = 1; 117 }; 118 }; 119 }