111 lines
3.1 KiB
Nix
111 lines
3.1 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
# Check about:support for extension/add-on ID strings.
|
|
extensions = [
|
|
"uBlock0@raymondhill.net" # uBlock Origin
|
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" # Bitwarden
|
|
"addon@darkreader.org" # Dark Reader
|
|
"@testpilot-containers" # Tab Containers
|
|
"@contain-facebook" # Facebook Container
|
|
];
|
|
in
|
|
{
|
|
programs.firefox = {
|
|
enable = true;
|
|
|
|
configPath = "${config.xdg.configHome}/mozilla/firefox";
|
|
|
|
policies = {
|
|
#### DEBLOAT ###
|
|
DisableFirefoxStudies = true;
|
|
# DisableFirefoxScreenshots = true;
|
|
DontCheckDefaultBrowser = true;
|
|
UserMessaging = {
|
|
ExtensionRecommendations = false;
|
|
UrlbarInterventions = false;
|
|
SkipOnboarding = true;
|
|
MoreFromMozilla = false;
|
|
FirefoxLabs = false;
|
|
};
|
|
FirefoxSuggest = {
|
|
WebSuggestions = false;
|
|
SponsoredSuggestions = false;
|
|
ImproveSuggest = false;
|
|
Locked = true;
|
|
};
|
|
|
|
#### SECURITY ###
|
|
AutofillAddressEnabled = false;
|
|
AutofillCreditCardEnabled = false;
|
|
OfferToSaveLogins = false;
|
|
# HttpsOnlyMode = "force_enabled";
|
|
# SSLVersionMin = "tls1.2";
|
|
# PostQuantumKeyAgreementEnabled = true;
|
|
# HttpAllowlist = [ ];
|
|
|
|
#### PRIVACY ###
|
|
DisableTelemetry = true;
|
|
EnableTrackingProtection = {
|
|
Value = true;
|
|
Locked = true;
|
|
Cryptomining = true;
|
|
Fingerprinting = true;
|
|
Exceptions = [
|
|
"https://netflix.com"
|
|
"https://amazon.de"
|
|
"https://spotify.com"
|
|
];
|
|
};
|
|
DisablePocket = true;
|
|
NetworkPrediction = false;
|
|
|
|
SearchEngines = {
|
|
Remove = [
|
|
"eBay"
|
|
"Bing"
|
|
"Ecosia"
|
|
"Perplexity"
|
|
"NixOS packages"
|
|
"NixOS options"
|
|
];
|
|
Add = [
|
|
{
|
|
"Name" = "Printables";
|
|
"URLTemplate" = "https://www.printables.com/search/models?q={searchTerms}";
|
|
"IconURL" = "https://www.printables.com/favicon.ico";
|
|
"Alias" = "print";
|
|
}
|
|
{
|
|
"Name" = "Nix Options";
|
|
"URLTemplate" = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
|
|
"IconURL" = "https://search.nixos.org/favicon.ico";
|
|
"Alias" = "options";
|
|
}
|
|
{
|
|
"Name" = "Nix Packages";
|
|
"URLTemplate" = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
|
|
"IconURL" = "https://search.nixos.org/favicon.ico";
|
|
"Alias" = "pkgs";
|
|
}
|
|
];
|
|
Default = "Google";
|
|
};
|
|
SearchSuggestEnabled = false;
|
|
|
|
ExtensionSettings = builtins.listToAttrs (
|
|
map (id: {
|
|
name = id;
|
|
value = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
}) extensions
|
|
);
|
|
|
|
Preferences = {
|
|
"browser.urlbar.showSearchTerms.enabled" = false; # show url instead of search term
|
|
};
|
|
};
|
|
};
|
|
}
|