nixos/nate/modules/apps/firefox/firefox.nix

81 lines
3.8 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 = {
# Add pipewire support
package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true;}) {});
2023-12-18 20:12:41 -07:00
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}";
2023-12-18 20:12:41 -07:00
}];
};
"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" ];
};
2023-12-18 20:12:41 -07:00
};
};
settings = {
"browser.startup.blankWindow" = true;
2024-01-27 12:34:48 -07:00
"browser.startup.homepage" = "https://www.startpage.com/do/mypage.pl?prfe=11898a1adf7b7dfb587580692f358773a11ca25e993b8e077476641cec033319e15f2449c345f5be919fd0a082015c3e4ed23143bd4337512466c04c2999831a54abca2eaeb42963c63ff064";
"browser.newtabpage.enabled" = false;
2023-12-18 20:12:41 -07:00
"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;
"browser.toolbars.bookmarks.visibility" = "always";
2023-12-18 20:12:41 -07:00
# "browser.newtabpage.pinned" = [{
# title = "NixOS";
# url = "https://nixos.org";
# }];
};
};
};
};
};
}