123 lines
4.3 KiB
Nix
123 lines
4.3 KiB
Nix
{ config, pkgs, ... }:
|
|
let
|
|
lock-false = {
|
|
Value = false;
|
|
Status = "locked";
|
|
};
|
|
lock-true = {
|
|
Value = true;
|
|
Status = "locked";
|
|
};
|
|
in
|
|
{
|
|
programs.firefox = {
|
|
enable = true;
|
|
package = pkgs.firefox;
|
|
|
|
policies = {
|
|
# about:policies
|
|
DisableTelemetry = true;
|
|
DisableFirefoxStudies = true;
|
|
DisablePocket = true;
|
|
DisableFirefoxAccounts = true;
|
|
DisableAccounts = true;
|
|
DisplayBookmarksToolbar = "newtab";
|
|
DisplayMenuBar = "default-off";
|
|
SearchBar = "unified";
|
|
OfferToSaveLogins = false;
|
|
EnableTrackingProtection = {
|
|
Value= true;
|
|
Locked = true;
|
|
Cryptomining = true;
|
|
Fingerprinting = true;
|
|
};
|
|
|
|
# about:config
|
|
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;
|
|
};
|
|
|
|
ExtensionSettings = {
|
|
# Block all extensions except those defined below.
|
|
"*".installation_mode = "blocked";
|
|
|
|
# uBlock Origin
|
|
"uBlock0@raymondhill.net" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/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";
|
|
};
|
|
|
|
# Dark Reader
|
|
"addon@darkreader.org" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
};
|
|
};
|
|
|
|
profiles = {
|
|
"${config.home.username}" = {
|
|
search = {
|
|
force = true;
|
|
default = "searx";
|
|
order = [ "searx" ];
|
|
engines = {
|
|
"Amazon.com".metaData.hidden = true;
|
|
"Bing".metaData.hidden = true;
|
|
"eBay".metaData.hidden = true;
|
|
"Google".metaData.hidden = true;
|
|
"Wikipedia (en)".metaData.alias = "@w";
|
|
|
|
"searx" = {
|
|
urls = [{ template = "http://10.0.0.203:8888/?q={searchTerms}"; }];
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
definedAliases = [ "@sx" ];
|
|
};
|
|
|
|
"Nix Packages" = {
|
|
urls = [{
|
|
template = "https://search.nixos.org/packages";
|
|
params = [
|
|
{ name = "type"; value = "packages"; }
|
|
{ name = "query"; value = "{searchTerms}"; }
|
|
];
|
|
}];
|
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
definedAliases = [ "@np" ];
|
|
};
|
|
|
|
"NixOS Wiki" = {
|
|
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
|
|
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
definedAliases = [ "@nw" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|