nix-config/home/features/desktop/common/firefox.nix
GHOSCHT f054d7186e
Switch from Firefox to Librewolf
homemanager now supports Librewolf configuration
2025-01-09 23:51:43 +01:00

143 lines
5.4 KiB
Nix

{ inputs
, pkgs
, ...
}: {
# Enable kde-connect for non-Plasma DEs
home.file.".librewolf/native-messaging-hosts/org.kde.plasma.browser_integration.json".source = "${pkgs.plasma5Packages.plasma-browser-integration}/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json";
programs.librewolf = {
enable = true;
profiles.Default = {
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
bitwarden
ublock-origin
darkreader
tabliss
consent-o-matic
floccus
gesturefy
plasma-integration
libredirect
yomitan
];
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://home-manager-options.extranix.com";
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;
default = "DuckDuckGo";
};
settings = {
"ui.context_menus.after_mouseup" = true; # Fixes context menu after Gesturefy swipe
"extensions.screenshots.disabled" = true; # Firefox Screenshot feature is annoying
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false; # Disable cookie clearing
"media.hardwaremediakeys.enabled" = false; # Interferes with KDE Connect
"dom.security.https_only_mode" = true;
"browser.download.panel.shown" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"signon.rememberSignons" = false;
"browser.formfill.enable" = false;
"signon. prefillForms" = false;
"browser.shell.checkDefaultBrowser" = 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}'';
};
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}