This commit is contained in:
albert 2023-07-02 22:46:14 +09:00
parent 1eb0d0fc79
commit b4c33422b0
3 changed files with 41 additions and 37 deletions

View file

@ -1,40 +1,5 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
# https://github.com/NixOS/nixpkgs/issues/21244 programs.firefox = {
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; enable = true;
profiles.default = { profiles.default = {

View file

@ -17,6 +17,8 @@
./desktops/gnome.nix ./desktops/gnome.nix
# Promtail logging # Promtail logging
./software/promtail.nix ./software/promtail.nix
# Default configuration for Firefox
./software/firefox.nix
]; ];
# Keep the system up-to-date automatically # Keep the system up-to-date automatically
@ -191,4 +193,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }

37
software/firefox.nix Normal file
View file

@ -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";
};
};
}