nix-config/home/features/desktop/common/firefox.nix

183 lines
6 KiB
Nix
Raw Normal View History

2023-12-26 23:25:22 +01:00
{
inputs,
pkgs,
vars,
...
}: {
imports = [inputs.arkenfox.hmModules.default];
programs.firefox = {
enable = true;
2023-12-26 23:25:22 +01:00
arkenfox = {
enable = true;
version = "119.0";
};
profiles.Default = {
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
bitwarden
ublock-origin
darkreader
2023-12-28 18:24:36 +01:00
tabliss
consent-o-matic
];
search.engines = {
"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"];
};
"Home Manager" = {
urls = [
{
template = "https://mipmip.github.io/home-manager-option-search";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@hm"];
};
"Searx" = {
urls = [
{
template = "https://paulgo.io/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://paulgo.io/favicon.ico";
definedAliases = ["@sx"];
};
"Amazon" = {
urls = [
{
template = "https://www.amazon.de/s";
params = [
{
name = "k";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://amazon.de/favicon.ico";
definedAliases = ["@a"];
};
"YouTube" = {
urls = [
{
template = "https://efy.piped.pages.dev/results";
params = [
{
name = "search_query";
value = "{searchTerms}";
}
];
}
];
iconUpdateURL = "https://piped.video/favicon.ico";
definedAliases = ["yt"];
};
};
search.force = true;
search.default = "Searx";
settings = {
"dom.security.https_only_mode" = true;
"browser.download.panel.shown" = true;
"signon.rememberSignons" = false;
2023-12-28 18:24:36 +01:00
"browser.formfill.enable" = false;
"signon. prefillForms" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["addon_darkreader_org-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","downloads-button","unified-extensions-button","ublock0_raymondhill_net-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","addon_darkreader_org-browser-action","ublock0_raymondhill_net-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","unified-extensions-area"],"currentVersion":20,"newElementCount":4}'';
};
arkenfox = {
enable = true;
2023-12-28 18:24:36 +01:00
"0000".enable = true;
"0100" = {
enable = true;
# Allow setting homepage
"0102"."browser.startup.page".value = 1;
};
"0200" = {
enable = true;
};
"0300".enable = true;
# We keep safebrowsing
"0400".enable = false;
"0600" = {
enable = true;
"0610"."browser.send_pings".enable = true;
};
"0700" = {
enable = true;
# Disable DNS over HTTPS
"0710"."network.trr.mode".value = 5;
};
# "0800" = {
# enable = true;
# # Keep using url bar as search bar
# "0801"."keyword.enabled".value = true;
# };
"0900".enable = true;
"1000" = {
enable = true;
# Enable disk cache for performance reasons
"1001"."browser.cache.disk.enable".enable = true;
"1001"."browser.cache.disk.enable".value = true;
};
"1200".enable = true;
# I don't use container tabs
"1700".enable = false;
"2600" = {
enable = true;
# The recent documents feature is useful
"2653".enable = false;
};
"2700".enable = true;
};
2023-12-26 23:25:22 +01:00
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = ["firefox.desktop"];
"text/xml" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
};
}