nix-config/users/tacocat/programs/firefox.nix
2024-03-06 15:32:12 -05:00

171 lines
5.2 KiB
Nix

{pkgs, ...}: {
programs.firefox = {
enable = true;
policies = {
DisableAppUpdate = true;
DisableFirefoxAccounts = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
EnableTrackingProtection = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
Pocket = false;
Snippets = false;
TopSites = false;
Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
Cookies = {
ExpireAtSessionEnd = true;
RejectTracker = true;
};
SanitizeOnShutdown = {
Cache = true;
Cookies = true;
Downloads = true;
FormData = true;
SiteSettings = true;
History = false;
};
};
profiles = {
"aria" = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
vimium
tabcenter-reborn
ublock-origin
bitwarden
canvasblocker
sponsorblock
xbrowsersync
];
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.startup.page" = 1;
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"intl.accept_languages" = "en-US, en";
"app.update.auto" = false;
"browser.download.useDownloadDir" = false;
"browser.download.manager.addToRecentDocs" = false;
"browser.urlbar.suggest.addons" = false;
"browser.urlbar.suggest.clipboard" = false;
"browser.urlbar.suggest.engines" = false;
"browser.urlbar.suggest.history" = false;
"browser.urlbar.suggest.pocket" = false;
"browser.urlbar.suggest.topsites" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.suggest.trending" = false;
"browser.tabs.firefox-view" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.toolbars.bookmarks.visibility" = "never";
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
};
search = {
force = true;
default = "Celtic Lite";
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "type";
value = "options";
}
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"];
};
"Celtic Lite" = {
urls = [
{
template = "https://search.celticlite.com/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = ["@cl"];
};
"Catgirl" = {
urls = [
{
template = "https://sx.catgirl.cloud/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = ["@cg"];
};
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
userChrome = ''
#firefox-view-button {
visibility: collapse;
}
#alltabs-button {
visibility: collapse;
}
#tabbrowser-tabs {
border-inline-start: none !important;
}
'';
};
};
};
}