2024-12-11 20:09:53 -07:00
|
|
|
{ pkgs, inputs, system, lib, ty-home-manager-options, ... }:
|
2024-12-02 03:57:34 -07:00
|
|
|
{
|
2024-12-11 20:09:53 -07:00
|
|
|
programs.firefox = lib.mkIf ty-home-manager-options.firefox.enable {
|
2024-12-02 03:57:34 -07:00
|
|
|
enable = true;
|
|
|
|
policies = {
|
|
|
|
ExtensionSettings = {
|
|
|
|
# Force install alpenglow theme (why wouldn't you want it)
|
|
|
|
"firefox-alpenglow@mozilla.org" = {
|
|
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/firefox-alpenglow/latest.xpi";
|
|
|
|
installation_mode = "force_installed";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
profiles = {
|
|
|
|
default = {
|
|
|
|
id = 0;
|
|
|
|
name = "default";
|
|
|
|
isDefault = true;
|
|
|
|
|
|
|
|
# Settings
|
|
|
|
settings = {
|
|
|
|
# Theming
|
|
|
|
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; # Purple
|
|
|
|
"browser.tabs.inTitlebar" = 0; # Enable native title bar
|
|
|
|
"browser.uidensity" = 2; # Touchscreen density
|
|
|
|
"browser.newtab.extensionControlled" = true; # Tabliss
|
|
|
|
"browser.startup.homepage_override.extensionControlled" = true; # More tabliss
|
|
|
|
|
|
|
|
# Extensions
|
|
|
|
"extensions.autoDisableScopes" = 0; # Auto enable extensions
|
|
|
|
"extensions.enabledScopes" = 15;
|
|
|
|
|
|
|
|
# Basic options
|
|
|
|
"privacy.userContext.newTabContainerOnLeftClick.enabled" = true; # Container selection on +
|
|
|
|
"findbar.highlightAll" = true; # Highlight all search results in Ctrl+F
|
|
|
|
|
|
|
|
# Toolbar customization
|
|
|
|
"browser.download.autohideButton" = false;
|
|
|
|
"browser.uiCustomization.state" = ''
|
|
|
|
{
|
|
|
|
"placements": {
|
|
|
|
"widget-overflow-fixed-list": [],
|
|
|
|
"unified-extensions-area": [
|
|
|
|
"sponsorblocker_ajay_app-browser-action",
|
|
|
|
"firefox-addon_pronoundb_org-browser-action",
|
|
|
|
"gdpr_cavi_au_dk-browser-action",
|
|
|
|
"7esoorv3_alefvanoon_anonaddy_me-browser-action",
|
|
|
|
"addon_fastforward_team-browser-action",
|
|
|
|
"jid1-aqqsmbyb0a8adg_jetpack-browser-action",
|
|
|
|
"_e58d3966-3d76-4cd9-8552-1582fbc800c1_-browser-action",
|
|
|
|
"plasma-browser-integration_kde_org-browser-action"
|
|
|
|
],
|
|
|
|
"nav-bar": [
|
|
|
|
"back-button",
|
|
|
|
"forward-button",
|
|
|
|
"stop-reload-button",
|
|
|
|
"urlbar-container",
|
|
|
|
"save-to-pocket-button",
|
|
|
|
"fxa-toolbar-menu-button",
|
|
|
|
"downloads-button",
|
|
|
|
"unified-extensions-button",
|
|
|
|
"reset-pbm-toolbar-button",
|
|
|
|
"addon_darkreader_org-browser-action",
|
|
|
|
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action",
|
|
|
|
"ublock0_raymondhill_net-browser-action",
|
|
|
|
"_799c0914-748b-41df-a25c-22d008f9e83f_-browser-action"
|
|
|
|
],
|
|
|
|
"toolbar-menubar": [
|
|
|
|
"menubar-items"
|
|
|
|
],
|
|
|
|
"TabsToolbar": [
|
|
|
|
"home-button",
|
|
|
|
"new-tab-button",
|
|
|
|
"tabbrowser-tabs",
|
|
|
|
"alltabs-button"
|
|
|
|
],
|
|
|
|
"vertical-tabs": [],
|
|
|
|
"PersonalToolbar": [
|
|
|
|
"import-button",
|
|
|
|
"personal-bookmarks"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"seen": [
|
|
|
|
"reset-pbm-toolbar-button",
|
|
|
|
"profiler-button",
|
|
|
|
"developer-button",
|
|
|
|
"ublock0_raymondhill_net-browser-action",
|
|
|
|
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action",
|
|
|
|
"firefox-addon_pronoundb_org-browser-action",
|
|
|
|
"gdpr_cavi_au_dk-browser-action",
|
|
|
|
"7esoorv3_alefvanoon_anonaddy_me-browser-action",
|
|
|
|
"addon_darkreader_org-browser-action",
|
|
|
|
"addon_fastforward_team-browser-action",
|
|
|
|
"jid1-aqqsmbyb0a8adg_jetpack-browser-action",
|
|
|
|
"_e58d3966-3d76-4cd9-8552-1582fbc800c1_-browser-action",
|
|
|
|
"plasma-browser-integration_kde_org-browser-action",
|
|
|
|
"sponsorblocker_ajay_app-browser-action",
|
|
|
|
"_799c0914-748b-41df-a25c-22d008f9e83f_-browser-action"
|
|
|
|
],
|
|
|
|
"dirtyAreaCache": [
|
|
|
|
"nav-bar",
|
|
|
|
"vertical-tabs",
|
|
|
|
"PersonalToolbar",
|
|
|
|
"toolbar-menubar",
|
|
|
|
"TabsToolbar",
|
|
|
|
"unified-extensions-area"
|
|
|
|
],
|
|
|
|
"currentVersion": 20,
|
|
|
|
"newElementCount": 9
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
# Search engine configuration
|
|
|
|
search = {
|
|
|
|
force = true;
|
|
|
|
default = "SearXNG";
|
|
|
|
order = [
|
|
|
|
"SearXNG"
|
|
|
|
"Google"
|
|
|
|
"Wikipedia"
|
|
|
|
"Nix Packages"
|
|
|
|
"NixOS Options"
|
|
|
|
"Home Manager Options"
|
|
|
|
"NixOS Wiki"
|
|
|
|
];
|
|
|
|
engines = {
|
|
|
|
# Nix Package Search
|
|
|
|
"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" ];
|
|
|
|
};
|
|
|
|
# NixOS Options Search
|
|
|
|
"NixOS Options" = {
|
|
|
|
urls = [{
|
|
|
|
template = "https://search.nixos.org/options";
|
|
|
|
params = [
|
|
|
|
{ name = "type"; value = "packages"; }
|
|
|
|
{ name = "query"; value = "{searchTerms}"; }
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
|
|
definedAliases = [ "@no" ];
|
|
|
|
};
|
|
|
|
# Nix Home-Manager options search
|
|
|
|
"Home Manager Options" = {
|
|
|
|
urls = [{
|
|
|
|
template = "https://home-manager-options.extranix.com";
|
|
|
|
params = [{ name = "query"; value = "{searchTerms}"; }];
|
|
|
|
}];
|
|
|
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
|
|
definedAliases = [ "@ho" ];
|
|
|
|
};
|
|
|
|
# NixOS Wiki Search
|
|
|
|
"NixOS Wiki" = {
|
|
|
|
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
|
|
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
|
|
definedAliases = [ "@nw" ];
|
|
|
|
};
|
|
|
|
# Personal SearXNG instance
|
|
|
|
"SearXNG" = {
|
|
|
|
urls = [{ template = "https://search.myriation.xyz/?q={searchTerms}"; }];
|
|
|
|
iconUpdateURL = "https://search.myriation.xyz/static/themes/simple/img/favicon.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
|
|
definedAliases = [ "@sx" "@searx" ];
|
|
|
|
};
|
|
|
|
"Bing".metaData.hidden = true;
|
|
|
|
"eBay".metaData.hidden = true;
|
|
|
|
"Amazon.com".metaData.hidden = true;
|
|
|
|
"DuckDuckGo".metaData.hidden = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Extensions (NUR)
|
|
|
|
extensions = with inputs.firefox-addons.packages."${system}"; [
|
|
|
|
bitwarden
|
|
|
|
ublock-origin
|
|
|
|
tabliss
|
|
|
|
buster-captcha-solver # reCaptcha begone
|
|
|
|
consent-o-matic # Fuck cookie popups
|
|
|
|
darkreader # Dark mode on all website
|
|
|
|
fastforwardteam # Skip unnecessary short links
|
|
|
|
libredirect # Redirect to better private frontends
|
|
|
|
mailvelope # GPG Email encryption for the web
|
|
|
|
plasma-integration # KDE Plasma support
|
|
|
|
pronoundb # :3
|
|
|
|
sponsorblock # Sponsor & Intro skipping for youtube
|
|
|
|
web-scrobbler # Last.FM & ListenBrainz scrobbling
|
|
|
|
# TODO Request better-canvas
|
|
|
|
];
|
|
|
|
|
|
|
|
# Containers
|
|
|
|
containersForce = true;
|
|
|
|
containers = {
|
|
|
|
# The letters are a hack to sort the entries in firefox (it adds them alphabetically)
|
|
|
|
A-Personal = {
|
|
|
|
id = 2;
|
|
|
|
name = "Personal";
|
|
|
|
color = "purple";
|
|
|
|
icon = "fingerprint";
|
|
|
|
};
|
|
|
|
|
|
|
|
B-College = {
|
|
|
|
id = 1;
|
|
|
|
name = "College";
|
|
|
|
color = "orange";
|
|
|
|
icon = "fruit";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|