nixos/modules/apps/firefox/firefox.nix

64 lines
2.6 KiB
Nix

{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/sp/search?query={searchTerms}";
}];
};
};
};
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;
# "browser.bookmarks.showMobileBookmarks" = true;
# "browser.newtabpage.pinned" = [{
# title = "NixOS";
# url = "https://nixos.org";
# }];
};
};
};
};
};
}