103 lines
4.2 KiB
Nix
103 lines
4.2 KiB
Nix
{
|
|
pkgs,
|
|
myConfig,
|
|
id,
|
|
name,
|
|
url,
|
|
...
|
|
}: {
|
|
inherit id name;
|
|
|
|
# Note: This profile relies on the global tridactylrc logic in default.nix
|
|
# to dynamically set 'newtab' via the TRIDACTYL_NEWTAB environment variable.
|
|
search.force = true;
|
|
search.default = "ddg";
|
|
extensions.force = true;
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
];
|
|
|
|
settings = {
|
|
# --- PROXY CONFIGURATION (HTTP & HTTPS) ---
|
|
"network.proxy.type" = 1; # 1 = Manual proxy configuration (0 = Direct, 5 = System)
|
|
|
|
# HTTP Proxy Settings
|
|
"network.proxy.http" = myConfig.proxy.ip;
|
|
"network.proxy.http_port" = myConfig.proxy.port;
|
|
|
|
# HTTPS / SSL Proxy Settings (Routing HTTPS through the same HTTP proxy)
|
|
"network.proxy.ssl" = myConfig.proxy.ip;
|
|
"network.proxy.ssl_port" = myConfig.proxy.port;
|
|
|
|
# Tell Firefox to share these settings across all protocols
|
|
"network.proxy.share_proxy_settings" = true;
|
|
|
|
# Define what should NOT go through the proxy (local network addresses)
|
|
"network.proxy.no_proxies_on" = "localhost, 127.0.0.1, ::1, 192.168.0.0/16, 10.0.0.0/8";
|
|
|
|
# Fail closed: Do NOT fall back to direct connection if the proxy fails or times out
|
|
"network.proxy.failover_timeout" = 1800;
|
|
|
|
# Optional: If your HTTP proxy itself is encrypted over TLS (HTTPS proxying to the server), uncomment:
|
|
# "network.proxy.proxy_over_tls" = true;
|
|
|
|
# --- New Tab Override ---
|
|
"extensions.newtaboverride@agenedia.com.url" = url;
|
|
"extensions.newtaboverride@agenedia.com.type" = 1; # URL mode
|
|
|
|
# --- Privacy & Hardening ---
|
|
"browser.contentblocking.category" = "strict";
|
|
"privacy.trackingprotection.enabled" = true;
|
|
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
|
|
"geo.enabled" = false;
|
|
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
|
|
"network.dns.disablePrefetch" = true;
|
|
"network.prefetch-next" = false;
|
|
|
|
# --- NixOS / Hyprland Integration ---
|
|
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
|
|
|
|
# --- UI & Behavior ---
|
|
"browser.toolbars.bookmarks.visibility" = "never";
|
|
"browser.compactmode.show" = true;
|
|
"browser.tabs.closeWindowWithLastTab" = false;
|
|
"extensions.pocket.enabled" = false;
|
|
"extensions.screenshots.disabled" = true;
|
|
"browser.topsites.contile.enabled" = false;
|
|
"browser.formfill.enable" = false;
|
|
"browser.search.suggest.enabled" = false;
|
|
"browser.search.suggest.enabled.private" = false;
|
|
"browser.urlbar.suggest.searches" = false;
|
|
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
|
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
|
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
"extensions.autoDisableScopes" = 0; # Enable extensions by default
|
|
|
|
# --- Homepage & Navigation ---
|
|
"browser.startup.page" = 1; # Always open the homepage
|
|
"browser.startup.homepage" = url;
|
|
"browser.newtab.url" = url; # Try to set newtab to homepage
|
|
"browser.sessionstore.resume_from_crash" = false; # Always start fresh
|
|
"browser.sessionstore.max_tabs_undo" = 0; # Disable undo close tab
|
|
|
|
# --- DNS over HTTPS ---
|
|
# Mode 5 disables native DoH explicitly. When using an HTTP proxy, standard HTTP requests
|
|
# send the full URI and HTTPS requests use the CONNECT method with domain names, meaning
|
|
# DNS resolution is handled directly by the proxy server without local DNS leaks.
|
|
"network.trr.mode" = 5;
|
|
# --- private ---
|
|
"browser.privatebrowsing.autostart" = true;
|
|
"extensions.allowPrivateBrowsingByDefault" = true;
|
|
};
|
|
|
|
# Optional: Append your userChrome = '' ... ''; block here if needed
|
|
}
|