2024-10-15 02:40:43 -04:00
|
|
|
{ pkgs, config, ... }:
|
2024-10-09 03:36:08 -04:00
|
|
|
let
|
2024-11-13 03:43:51 -05:00
|
|
|
# FireFox theme, based on https://github.com/Dook97/firefox-qutebrowser-userchrome
|
|
|
|
themeFont = ''
|
|
|
|
--tab-font: '${config.look.fonts.main}';
|
|
|
|
--urlbar-font: '${config.look.fonts.main}';
|
|
|
|
'';
|
2024-08-24 22:16:51 -04:00
|
|
|
themeJim = ''
|
|
|
|
:root {
|
2024-10-15 02:40:43 -04:00
|
|
|
--tab-active-bg-color: #${config.look.colors.prime};
|
|
|
|
--tab-hover-bg-color: #${config.look.colors.accent};
|
|
|
|
--tab-inactive-bg-color: #${config.look.colors.dark};
|
2024-08-24 22:16:51 -04:00
|
|
|
--tab-active-fg-fallback-color: #FFFFFF;
|
2024-10-15 02:40:43 -04:00
|
|
|
--tab-inactive-fg-fallback-color: #${config.look.colors.text};
|
|
|
|
--urlbar-focused-bg-color: #${config.look.colors.dark};
|
|
|
|
--urlbar-not-focused-bg-color: #${config.look.colors.dark};
|
|
|
|
--toolbar-bgcolor: #${config.look.colors.dark} !important;
|
2024-08-24 22:16:51 -04:00
|
|
|
'';
|
|
|
|
themeAlt = ''
|
|
|
|
:root {
|
2024-10-15 02:40:43 -04:00
|
|
|
--tab-active-bg-color: #${config.look.colors.dark};
|
|
|
|
--tab-hover-bg-color: #${config.look.colors.accent};
|
|
|
|
--tab-inactive-bg-color: #${config.look.colors.prime};
|
|
|
|
--tab-active-fg-fallback-color: #${config.look.colors.text};
|
2024-08-24 22:16:51 -04:00
|
|
|
--tab-inactive-fg-fallback-color: #FFFFFF;
|
2024-10-15 02:40:43 -04:00
|
|
|
--urlbar-focused-bg-color: #${config.look.colors.prime};
|
|
|
|
--urlbar-not-focused-bg-color: #${config.look.colors.prime};
|
|
|
|
--toolbar-bgcolor: #${config.look.colors.prime} !important;
|
2024-08-24 22:16:51 -04:00
|
|
|
'';
|
|
|
|
in {
|
|
|
|
# Enable Librewolf and extensions
|
|
|
|
programs.firefox = let
|
|
|
|
commonExtensions = with config.nur.repos.rycee.firefox-addons; [
|
|
|
|
ublock-origin
|
|
|
|
bitwarden
|
|
|
|
darkreader
|
|
|
|
sponsorblock
|
|
|
|
return-youtube-dislikes
|
2024-09-13 23:50:43 -04:00
|
|
|
simple-tab-groups
|
2024-10-27 16:46:50 -04:00
|
|
|
vimium
|
2024-08-24 22:16:51 -04:00
|
|
|
];
|
|
|
|
commonSearch = {
|
|
|
|
force = true;
|
2024-11-18 17:14:02 -05:00
|
|
|
default = "Ecosia";
|
|
|
|
order = [
|
|
|
|
"Ecosia"
|
|
|
|
"NixPKGs"
|
|
|
|
"MyNixOS"
|
|
|
|
"YouTube"
|
|
|
|
];
|
2024-08-24 22:16:51 -04:00
|
|
|
engines = {
|
2024-11-18 17:14:02 -05:00
|
|
|
"Ecosia" = {
|
2024-08-24 22:16:51 -04:00
|
|
|
urls = [
|
|
|
|
{
|
2024-11-18 17:14:02 -05:00
|
|
|
template = "https://www.ecosia.org/search";
|
2024-08-24 22:16:51 -04:00
|
|
|
params = [
|
|
|
|
{
|
|
|
|
name = "q";
|
|
|
|
value = "{searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
2024-11-18 17:14:02 -05:00
|
|
|
definedAliases = [ "@e" ];
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
"NixPKGs" = {
|
|
|
|
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";
|
2024-11-02 17:19:40 -04:00
|
|
|
definedAliases = [ "@pkgs" ];
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
2024-11-18 17:14:02 -05:00
|
|
|
"MyNixOS" = {
|
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://mynixos.com/search";
|
|
|
|
params = [
|
|
|
|
{
|
|
|
|
name = "q";
|
|
|
|
value = "{searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
definedAliases = [ "@my" ];
|
|
|
|
};
|
|
|
|
"YouTube" = {
|
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://www.youtube.com/results";
|
|
|
|
params = [
|
|
|
|
{
|
|
|
|
name = "search_query";
|
|
|
|
value = "{searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
definedAliases = [ "@y" ];
|
|
|
|
};
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
commonSettings = {
|
|
|
|
"general.autoScroll" = true;
|
2024-11-14 14:41:18 -05:00
|
|
|
|
2024-11-19 13:20:34 -05:00
|
|
|
"places.history.enabled" = false;
|
|
|
|
|
2024-11-14 14:41:18 -05:00
|
|
|
"font.name.serif.x-western" = config.look.fonts.main;
|
|
|
|
"font.name.sans-serif.x-western" = config.look.fonts.main;
|
|
|
|
"font.name.monospace.x-western" = config.look.fonts.nerd;
|
|
|
|
|
2024-08-24 22:16:51 -04:00
|
|
|
"browser.uidensity" = 1;
|
2024-11-19 13:20:34 -05:00
|
|
|
"browser.compactmode.show" = true;
|
2024-11-14 14:41:18 -05:00
|
|
|
"browser.toolbars.bookmarks.visibility" = "never";
|
|
|
|
"browser.contentblocking.category" = "strict";
|
|
|
|
"browser.helperApps.deleteTempFileOnExit" = true;
|
2024-11-18 17:14:02 -05:00
|
|
|
"browser.search.separatePrivateDefault" = false;
|
2024-11-19 13:20:34 -05:00
|
|
|
"browser.download.useDownloadDir" = true;
|
|
|
|
"browser.startup.page" = 3;
|
|
|
|
"browser.newtabpage.enabled" = false;
|
2024-11-22 20:28:52 -05:00
|
|
|
"browser.tabs.inTitlebar" = 0;
|
2024-11-14 14:41:18 -05:00
|
|
|
|
2024-08-24 22:16:51 -04:00
|
|
|
"extensions.pocket.enabled" = false;
|
2024-11-14 14:41:18 -05:00
|
|
|
"extensions.autoDisableScopes" = 0;
|
2024-11-24 20:02:09 -05:00
|
|
|
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
2024-11-14 14:41:18 -05:00
|
|
|
|
2024-08-24 22:16:51 -04:00
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
2024-11-14 14:41:18 -05:00
|
|
|
"toolkit.tabbox.switchByScrolling" = true;
|
|
|
|
|
2024-11-18 17:14:02 -05:00
|
|
|
"privacy.resistFingerprinting" = true;
|
|
|
|
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true;
|
|
|
|
"privacy.fingerprintingProtection" = true;
|
2024-11-14 14:41:18 -05:00
|
|
|
"privacy.donottrackheader.enabled" = true;
|
|
|
|
"privacy.globalprivacycontrol.enabled" = true;
|
|
|
|
"privacy.globalprivacycontrol.functionality.enabled" = true;
|
2024-11-18 17:14:02 -05:00
|
|
|
"privacy.clearOnShutdown.history" = true;
|
2024-08-24 22:16:51 -04:00
|
|
|
"privacy.clearOnShutdown.cookies" = false;
|
2024-11-02 17:19:40 -04:00
|
|
|
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
2024-11-14 14:41:18 -05:00
|
|
|
"privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
|
|
|
|
|
|
|
|
"urlclassifier.trackingSkipURLs" = "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com";
|
|
|
|
"urlclassifier.features.socialtracking.skipURLs" = "*.instagram.com, *.twitter.com, *.twimg.com";
|
|
|
|
|
2024-11-18 17:14:02 -05:00
|
|
|
"network.trr.mode" = 3;
|
|
|
|
"network.trr.uri" = "https://doh.libredns.gr/noads";
|
|
|
|
"network.http.referer.XOriginPolicy" = true;
|
2024-11-14 14:41:18 -05:00
|
|
|
"network.cookie.sameSite.noneRequiresSecure" = true;
|
2024-11-18 17:14:02 -05:00
|
|
|
|
|
|
|
"media.ffmpeg.vaapi.enabled" = true;
|
|
|
|
"media.rdd-ffmpeg.enabled" = true;
|
|
|
|
"media.hardware-video-decoding.force-enabled" = true;
|
|
|
|
|
|
|
|
"gfx.webrender.all" = true;
|
|
|
|
"gfx.x11-egl.force-enabled" = true;
|
|
|
|
|
2024-11-19 13:20:34 -05:00
|
|
|
"clipboard.autocopy" = false;
|
|
|
|
"middlemouse.paste" = false;
|
|
|
|
|
2024-08-24 22:16:51 -04:00
|
|
|
"svg.context-properties.content.enabled" = true;
|
|
|
|
"device.sensors.motion.enabled" = false;
|
|
|
|
"gnomeTheme.hideSingleTab" = true;
|
2024-09-08 09:31:28 -04:00
|
|
|
"webgl.disabled" = false;
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.librewolf;
|
|
|
|
profiles = {
|
2024-10-28 04:55:29 -04:00
|
|
|
Main = {
|
2024-08-24 22:16:51 -04:00
|
|
|
id = 0;
|
|
|
|
extensions = commonExtensions;
|
|
|
|
search = commonSearch;
|
|
|
|
settings = commonSettings;
|
|
|
|
userChrome = ''
|
|
|
|
${themeJim}
|
2024-11-13 03:43:51 -05:00
|
|
|
${themeFont}
|
|
|
|
${builtins.readFile ./quteFox.css}
|
2024-08-24 22:16:51 -04:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
Alt = {
|
|
|
|
id = 1;
|
|
|
|
extensions = commonExtensions;
|
|
|
|
search = commonSearch;
|
|
|
|
settings = commonSettings;
|
|
|
|
userChrome = ''
|
|
|
|
${themeAlt}
|
2024-11-13 03:43:51 -05:00
|
|
|
${themeFont}
|
|
|
|
${builtins.readFile ./quteFox.css}
|
2024-08-24 22:16:51 -04:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
Misc = {
|
|
|
|
id = 2;
|
|
|
|
extensions = commonExtensions;
|
|
|
|
search = commonSearch;
|
|
|
|
settings = commonSettings;
|
|
|
|
containersForce = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Fixes
|
|
|
|
home.file = {
|
|
|
|
# Symlinks to Librewolf
|
|
|
|
".librewolf".source = config.lib.file.mkOutOfStoreSymlink "/home/jimbo/.mozilla/firefox";
|
|
|
|
|
|
|
|
# Gnome theme
|
2024-11-14 14:41:18 -05:00
|
|
|
".mozilla/firefox/Misc/chrome".source = fetchTarball {
|
|
|
|
url = "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/refs/tags/v132.zip";
|
|
|
|
sha256 = "095sv1ann2v7q5bfy65i118ylhp2vkpbgyf6fz84nd9yrx14rzwm";
|
|
|
|
};
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
}
|