diff --git a/common/dotfiles/firefox.nix b/common/dotfiles/firefox.nix index 84236e22..e76fbff6 100644 --- a/common/dotfiles/firefox.nix +++ b/common/dotfiles/firefox.nix @@ -1,40 +1,5 @@ { config, pkgs, ... }: { - # https://github.com/NixOS/nixpkgs/issues/21244 - 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 = { + programs.firefox = { enable = true; profiles.default = { diff --git a/configuration.nix b/configuration.nix index d76375e0..52ec9400 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,8 @@ ./desktops/gnome.nix # Promtail logging ./software/promtail.nix + # Default configuration for Firefox + ./software/firefox.nix ]; # Keep the system up-to-date automatically @@ -191,4 +193,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? -} \ No newline at end of file +} diff --git a/software/firefox.nix b/software/firefox.nix new file mode 100644 index 00000000..158927ad --- /dev/null +++ b/software/firefox.nix @@ -0,0 +1,37 @@ +{ config, pkgs, ... }: { + programs.firefox = { + enable = true; + # https://search.nixos.org/options?channel=23.05&show=programs.firefox.preferences&from=0&size=50&sort=relevance&type=packages&query=firefox + preferences = { + "extension.pocket.enabled" = "false"; + "toolkit.telemetry.pioneer-new-studies-availble" = "false"; + "datareporting.healthreport.uploadEnabled" = "false"; + "datareporting.healthreport.infoURL" = "null"; + "toolkit.telemetry.server" = "null"; + "browser.newtabpage.activity-stream.feeds.telemetry" = "false"; + "browser.newtabpage.activity-stream.telemetry" = "false"; + "browser.ping-centre.telemetry" = "false"; + "toolkit.telemetry.enabled" = "false"; + "toolkit.telemetry.firstShutdownPing.enabled" = "false"; + "toolkit.telemetry.hybridContent.enabled" = "false"; + "toolkit.telemetry.newProfilePing.enabled" = "false"; + "toolkit.telemetry.shutdownPingSender.enabled" = "false"; + "toolkit.telemetry.updatePing.enabled" = "false"; + "toolkit.telemetry.reportingpolicy.firstRun" = "false"; + "toolkit.telemetry.unified" = "false"; + "toolkit.telemetry.archive.enabled" = "false"; + "devtools.onboarding.telemetry.logged" = "false"; + "toolkit.telemetry.bhrPing.enabled" = "false"; + "datareporting.policy.dataSubmissionEnabled" = "false"; + "datareporting.sessions.current.clean" = "true"; + "browser.startup.homepage" = "https://dir.sysctl.io"; + "browser.search.region" = "US"; + "browser.search.isUS" = false; + "distribution.searchplugins.defaultLocale" = "en-US"; + "general.useragent.locale" = "en-US"; + "browser.bookmarks.showMobileBookmarks" = "false"; + "browser.newtabpage.enabled" = "false"; + "services.sync.prefs.sync.browser.newtabpage.enabled" = "false"; + }; + }; +}