nixos-configuration/modules/programs/firefox.nix
2025-03-21 02:00:29 +01:00

129 lines
4.7 KiB
Nix
Executable file

{
config,
pkgs,
...
}: let
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in {
programs = {
firefox = {
enable = true;
languagePacks = ["en-US"];
/*
---- PROFILES ----
*/
profiles.defualt = {
search.engines = {
"Google".metaData.hidden = true;
"Bing".metaData.hidden = true;
"Ecosia".metaData.hidden = true;
"Facebook".metaData.hidden = true;
"Twitter".metaData.hidden = true;
"Youtube".metaData.hidden = true;
"Wikipedia".metaData.hidden = true;
"Reddit".metaData.hidden = true;
};
search.default = "DuckDuckGo";
search.privateDefault = "DuckDuckGo";
search.force = true;
};
/*
---- POLICIES ----
*/
# Check about:policies#documentation for options.
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab"
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate"
/*
---- EXTENSIONS ----
*/
# Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed".
ExtensionSettings = {
"*".installation_mode = "blocked"; # blocks all addons except the ones specified below
# uBlock Origin:
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
# Privacy Badger:
"jid1-MnnxcxisBPnSXQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
installation_mode = "force_installed";
};
# bitwarden
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
# FUCK youtube ai translated titles
"{458160b9-32eb-0f0c-8_d1-89ad3bdeb9dc}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/youtube-anti-translate/latext.xpi";
installation_mode = "force_installed";
};
# 1Password:
# "{d634138d-c276-4fc8-924b-40a0ea21d284}" = {
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi";
# installation_mode = "force_installed";
# };
};
/*
---- PREFERENCES ----
*/
# Check about:config for options.
Preferences = {
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"extensions.pocket.enabled" = lock-false;
"extensions.screenshots.disabled" = lock-true;
"browser.topsites.contile.enabled" = lock-false;
"browser.formfill.enable" = lock-false;
"browser.search.suggest.enabled" = lock-false;
"browser.search.suggest.enabled.private" = lock-false;
"browser.urlbar.suggest.searches" = lock-false;
"browser.urlbar.showSearchSuggestionsFirst" = lock-false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
};
};
};
};
}