121 lines
3.8 KiB
Nix
121 lines
3.8 KiB
Nix
{
|
|
pkgs,
|
|
myConfig,
|
|
...
|
|
}: {
|
|
id = 1;
|
|
name = "YouTube";
|
|
search.force = true;
|
|
search.default = "ddg";
|
|
extensions.force = true;
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
bitwarden
|
|
tridactyl
|
|
];
|
|
|
|
settings = {
|
|
# --- 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.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.homepage" = "https://youtube.com";
|
|
"browser.newtabpage.pinned" = myConfig.firefox.newtabpage;
|
|
|
|
# --- DNS over HTTPS (Quad9) ---
|
|
"network.trr.mode" = 2; # Use DoH with system fallback
|
|
"network.trr.uri" = "https://dns.quad9.net/dns-query";
|
|
};
|
|
|
|
userChrome = ''
|
|
/* --- Floating Autohide Toolbox (Tabs Only) --- */
|
|
|
|
/* Take toolbox out of the document flow so web content is 100% height */
|
|
#navigator-toolbox {
|
|
position: fixed !important;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 9999 !important;
|
|
background-color: var(--toolbar-bgcolor, #1c1b22) !important;
|
|
|
|
/* Start hidden */
|
|
transform: translateY(-100%) !important;
|
|
opacity: 0 !important;
|
|
transition: transform 0.2s ease, opacity 0.2s ease !important;
|
|
}
|
|
|
|
/* Trigger zone */
|
|
#navigator-toolbox::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 10px;
|
|
z-index: 10000 !important;
|
|
}
|
|
|
|
/* Reveal when hovering */
|
|
#navigator-toolbox:hover {
|
|
transform: translateY(0) !important;
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
/* --- Hide specific bars --- */
|
|
|
|
/* Hide Navigation Bar (Address Bar) COMPLETELY */
|
|
#nav-bar {
|
|
visibility: collapse !important;
|
|
height: 0px !important;
|
|
min-height: 0px !important;
|
|
padding: 0 !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* Hide Bookmarks Toolbar */
|
|
#PersonalToolbar { visibility: collapse !important; }
|
|
|
|
/* Hide Titlebar */
|
|
#titlebar { appearance: none !important; }
|
|
|
|
/* Ensure TabsToolbar looks okay on its own */
|
|
#TabsToolbar {
|
|
border: none !important;
|
|
background: transparent !important;
|
|
}
|
|
'';
|
|
}
|