nixos/modules/apps/firefox/firefox.nix

67 lines
3.0 KiB
Nix
Raw Normal View History

2023-12-18 20:12:41 -07:00
{lib, config, pkgs, inputs, ...}:
let
cfg = config.firefoxApp;
in
{
# imports = [
# inputs.nur.hmModules.nur
# ];
options.firefoxApp = {
enable = lib.mkEnableOption "enable firefox browser";
};
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
extensions = with pkgs; [
nur.repos.rycee.firefox-addons.darkreader
nur.repos.rycee.firefox-addons.keepassxc-browser
nur.repos.crazazy.firefox-addons.ublock-origin
];
search = {
# Replace default firefox search engine config with this one
force = true;
default = "Startpage";
engines = {
"Startpage" = {
urls = [{
template = "https://www.startpage.com/do/mypage.pl?prfe=a1ffaae1a3f4dc133b6e11b3d611db561598fc16fbc43a22c2694805a5b4d46852c848cb54f3ccbc9cea0e8e83dab567d3abe2b350870e7781f8701d4558a1c988aced444d1e8d8a7b830563/search?query={searchTerms}";
2023-12-18 20:12:41 -07:00
}];
};
};
};
settings = {
"browser.startup.blankWindow" = true;
"browser.startup.homepage" = "about:blank";
"browser.search.region" = "US";
"browser.search.isUS" = true;
"distribution.searchplugins.defaultLocale" = "en-US";
"general.useragent.locale" = "en-US";
"extensions.activeThemeID" = "{831b8843-7251-4306-9521-e688f18b4aeb}";
"privacy.trackingprotection.enable" = true;
"privacy.trackingprotection.emailtracking.enable" = true;
"privacy.trackingprotection.socialtracking.enable" = true;
"privacy.clearOnShutdown.cookies" = true;
"browser.safebrowsing.passwords.enabled" = false;
"browser.migrate.interactions.passwords" = false;
"pref.privacy.disable_button.view_passwords" = false;
"signon.rememberSignon" = false;
"extensions.formautofill.creditCards.enabled" = false;
"extensions.formautofill.addresses.enabled" = false;
2023-12-18 20:12:41 -07:00
# "browser.bookmarks.showMobileBookmarks" = true;
# "browser.newtabpage.pinned" = [{
# title = "NixOS";
# url = "https://nixos.org";
# }];
};
};
};
};
};
}