2023-11-22 15:33:16 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-02-26 14:38:51 -05:00
|
|
|
firefox-gx-src,
|
2023-11-22 15:33:16 -05:00
|
|
|
...
|
|
|
|
}: let
|
2024-01-22 11:09:37 -05:00
|
|
|
inherit (builtins) readFile;
|
2023-11-22 15:33:16 -05:00
|
|
|
firefox-addons = pkgs.recurseIntoAttrs (pkgs.callPackage ./addons {});
|
2023-10-09 04:13:58 -04:00
|
|
|
sound-volume = firefox-addons."600-sound-volume";
|
|
|
|
|
2024-02-26 14:38:51 -05:00
|
|
|
firefox-gx = pkgs.callPackage ./firefox-gx {
|
|
|
|
inherit firefox-gx-src;
|
|
|
|
};
|
2023-11-22 15:33:16 -05:00
|
|
|
in {
|
2023-10-09 04:13:58 -04:00
|
|
|
home.file = {
|
2023-11-22 15:33:16 -05:00
|
|
|
".mozilla/firefox/matt/chrome/components".source = "${firefox-gx}/chrome/components";
|
|
|
|
".mozilla/firefox/matt/chrome/icons".source = "${firefox-gx}/chrome/icons";
|
|
|
|
".mozilla/firefox/matt/chrome/images".source = "${firefox-gx}/chrome/images";
|
2023-10-10 15:34:34 -04:00
|
|
|
".mozilla/firefox/matt/chrome/userContent.css".source = "${firefox-gx}/chrome/userContent.css";
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
profiles.matt = {
|
|
|
|
isDefault = true;
|
|
|
|
id = 0;
|
|
|
|
|
2023-10-10 13:15:05 -04:00
|
|
|
userChrome = ''
|
2024-01-22 11:09:37 -05:00
|
|
|
${readFile "${firefox-gx}/chrome/userChrome.css"}
|
|
|
|
${readFile ./custom.css}
|
2023-10-10 13:15:05 -04:00
|
|
|
'';
|
2024-01-22 11:09:37 -05:00
|
|
|
extraConfig = readFile "${firefox-gx}/user.js";
|
2023-10-10 13:15:05 -04:00
|
|
|
|
2023-10-09 04:13:58 -04:00
|
|
|
settings = {
|
2023-10-26 00:35:24 -04:00
|
|
|
# Theme
|
|
|
|
"firefoxgx.tab-shapes" = true;
|
|
|
|
"firefoxgx.left-sidebar" = true;
|
|
|
|
"userChrome.tab.bottom_rounded_corner" = true;
|
|
|
|
"userChrome.tab.bottom_rounded_corner.wave" = false;
|
|
|
|
"userChrome.tab.bottom_rounded_corner.australis" = true;
|
|
|
|
|
2023-10-09 04:13:58 -04:00
|
|
|
# Open previous windows and tabs
|
|
|
|
"browser.startup.page" = 3;
|
|
|
|
|
|
|
|
# Prefs
|
2023-10-12 09:47:06 -04:00
|
|
|
"layout.css.devPixelsPerPx" = 1.12;
|
2023-10-09 04:13:58 -04:00
|
|
|
"browser.search.widget.inNavBar" = true;
|
|
|
|
"browser.toolbars.bookmarks.visibility" = "always";
|
2023-10-10 13:15:05 -04:00
|
|
|
"browser.toolbars.bookmarks.showInPrivateBrowsing" = true;
|
2023-10-30 20:59:34 -04:00
|
|
|
"ui.key.menuAccessKey" = 0;
|
2023-10-09 04:13:58 -04:00
|
|
|
|
|
|
|
# remove telemetry
|
|
|
|
"datareporting.policy.dataSubmissionEnabled" = false;
|
|
|
|
"datareporting.healthreport.uploadEnabled" = false;
|
|
|
|
"datareporting.healthreport.infoURL" = "";
|
|
|
|
"dom.security.https_only_mode" = true;
|
|
|
|
|
|
|
|
# remove first run and warning stuff
|
|
|
|
"datareporting.policy.firstRunURL" = "";
|
|
|
|
"browser.aboutwelcome.enabled" = false;
|
|
|
|
"browser.aboutConfig.showWarning" = false;
|
|
|
|
|
|
|
|
# Disable firefox autofill
|
|
|
|
"signon.rememberSignons" = false;
|
|
|
|
"extensions.formautofill.addresses.enabled" = false;
|
|
|
|
"extensions.formautofill.creditCards.enabled" = false;
|
|
|
|
|
|
|
|
# remove new tab stuff
|
|
|
|
"extensions.pocket.enabled" = false;
|
|
|
|
"services.sync.prefs.sync.browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
|
|
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
|
|
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
|
|
|
"browser.newtabpage.activity-stream.feeds.topsites" = false;
|
|
|
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
|
|
|
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
search = {
|
|
|
|
default = "DuckDuckGo";
|
|
|
|
force = true;
|
|
|
|
engines = {
|
2024-02-14 17:41:52 -05:00
|
|
|
"Nixpkgs" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
2024-02-14 17:41:52 -05:00
|
|
|
template = "https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20{searchTerms}&type=code";
|
2023-11-22 15:33:16 -05:00
|
|
|
}
|
|
|
|
];
|
2024-02-14 17:41:52 -05:00
|
|
|
iconUpdateURL = "https://github.githubassets.com/favicons/favicon.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
|
|
definedAliases = ["@pkgs"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
"NixOS Wiki" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
2023-10-09 04:13:58 -04:00
|
|
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@nw"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
"MyNixos" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://mynixos.com/search?q={searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
2023-10-09 04:13:58 -04:00
|
|
|
iconUpdateURL = "https://mynixos.com/favicon.ico";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@mn"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
2023-11-01 16:57:01 -04:00
|
|
|
"Noogle" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
2024-01-22 11:09:37 -05:00
|
|
|
template = "https://noogle.dev/q?term={searchTerms}";
|
2023-11-22 15:33:16 -05:00
|
|
|
}
|
|
|
|
];
|
2023-11-01 16:57:01 -04:00
|
|
|
iconUpdateURL = "https://noogle.dev/favicon.ico";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@ng"];
|
2023-11-01 16:57:01 -04:00
|
|
|
};
|
|
|
|
|
2023-10-09 04:13:58 -04:00
|
|
|
"Firefox Add-ons" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://addons.mozilla.org/en-US/firefox/search/?q={searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
2023-10-09 04:13:58 -04:00
|
|
|
iconUpdateURL = "https://addons.mozilla.org/favicon.ico";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@fa"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
"ProtonDB" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://www.protondb.com/search?q={searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
2023-10-09 04:13:58 -04:00
|
|
|
iconUpdateURL = "https://www.protondb.com/favicon.ico";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@pdb"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
"YouTube" = {
|
2023-11-22 15:33:16 -05:00
|
|
|
urls = [
|
|
|
|
{
|
|
|
|
template = "https://www.youtube.com/results?search_query={searchTerms}";
|
|
|
|
}
|
|
|
|
];
|
2023-10-09 04:13:58 -04:00
|
|
|
iconUpdateURL = "https://www.youtube.com/favicon.ico";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
2023-11-22 15:33:16 -05:00
|
|
|
definedAliases = ["@yt" "@youtube"];
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
"Bing".metaData.hidden = true;
|
|
|
|
"Google".metaData.hidden = true;
|
|
|
|
"eBay".metaData.hidden = true;
|
|
|
|
};
|
|
|
|
order = [
|
|
|
|
"DuckDuckGo"
|
|
|
|
"MyNixos"
|
|
|
|
"NixOS Wiki"
|
2024-02-14 17:41:52 -05:00
|
|
|
"Nixpkgs"
|
2023-11-01 16:57:01 -04:00
|
|
|
"Noogle"
|
2023-10-09 04:13:58 -04:00
|
|
|
"Wikipedia (en)"
|
|
|
|
"YouTube"
|
|
|
|
"Firefox Add-ons"
|
|
|
|
"ProtonDB"
|
|
|
|
"Amazon.ca"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
extensions = with config.nur.repos;
|
2023-11-22 15:33:16 -05:00
|
|
|
(with bandithedoge.firefoxAddons; [
|
|
|
|
sponsorblock
|
|
|
|
stylus
|
|
|
|
#tridactyl
|
|
|
|
ublock-origin
|
|
|
|
])
|
|
|
|
++ (with rycee.firefox-addons; [
|
|
|
|
bitwarden
|
|
|
|
darkreader
|
|
|
|
istilldontcareaboutcookies
|
|
|
|
image-search-options
|
|
|
|
return-youtube-dislikes
|
|
|
|
undoclosetabbutton
|
|
|
|
])
|
|
|
|
++ (with firefox-addons; [
|
2024-01-13 14:13:16 -05:00
|
|
|
floccus
|
2023-11-22 15:33:16 -05:00
|
|
|
sound-volume
|
|
|
|
google-container
|
|
|
|
checkmarks-web-ext
|
|
|
|
ttv-lol-pro
|
|
|
|
seventv
|
|
|
|
opera-gx-witchcraft-purple
|
|
|
|
]);
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|