nixos/modules/browser.nix

99 lines
3.1 KiB
Nix

{ pkgs, inputs, localEnv, ...}:
{
programs.librewolf = {
enable = true;
profiles.${localEnv.username} = {
settings = {
"cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
"cookiebanners.service.mode" = 2; # Block cookie banners
"privacy.donottrackheader.enabled" = true;
"privacy.fingerprintingProtection" = true;
"privacy.resistFingerprinting" = true;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
"general.useragent.compatMode.firefox" = true;
# Theme
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.drawInTitlebar" = true;
"svg.context-properties.content.enabled" = true;
};
extensions = with inputs.browser-addons.packages.${localEnv.system}; [
darkreader
awesome-rss
vimium-c
keepassxc-browser
floccus
return-youtube-dislikes
greasemonkey
];
search = {
default = "searx";
force = true;
order = [
"searx"
"nix-packages"
"startpage"
"google"
];
engines = {
searx = {
name = "Searx";
urls = [{
template = "https://searx.isan.ro/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@s" ];
iconMapObj."16" = "https://searx.isan.ro/favicon.ico";
};
nix-packages = {
name = "Nix Packages";
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
iconMapObj."16" = "https://search.nixos.org/favicon.png";
definedAliases = [ "@np" ];
};
startpage = {
name = "Startpage";
urls = [{
template = "https://startpage.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@sp" ];
iconMapObj."16" = "https://startpage.com/favicon.ico";
};
google = {
name = "Google";
urls = [{
template = "https://google.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@ggl" ];
iconMapObj."16" = "https://google.com/favicon.ico";
};
};
};
userChrome = ''
@import "firefox-gnome-theme/userChrome.css"
@import "firefox-gnome-theme/theme/colors/dark.css"
'';
};
};
}