{ pkgs, inputs, system, ... }: { programs.firefox = { 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 # Basic options "privacy.userContext.newTabContainerOnLeftClick.enabled" = true; # Container selection on + # Toolbar customization "browser.uiCustomization.state" = '' { "placements": { "widget-overflow-fixed-list": [], "unified-extensions-area": [], "nav-bar": [ "back-button", "forward-button", "stop-reload-button", "customizableui-special-spring1", "urlbar-container", "customizableui-special-spring2", "save-to-pocket-button", "downloads-button", "fxa-toolbar-menu-button", "reset-pbm-toolbar-button", "unified-extensions-button", "ublock0_raymondhill_net-browser-action", "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" ], "toolbar-menubar": [ "menubar-items" ], "TabsToolbar": [ "firefox-view-button", "tabbrowser-tabs", "new-tab-button", "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" ], "dirtyAreaCache": [ "nav-bar", "vertical-tabs", "PersonalToolbar", "toolbar-menubar", "TabsToolbar", "unified-extensions-area" ], "currentVersion": 20, "newElementCount": 3 } ''; }; # Search engine configuration search = { force = true; default = "SearXNG"; order = [ "SearXNG" "Google" "Wikipedia" "Nix Packages" "NixOS 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" ]; }; # 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 ]; # 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"; }; }; }; }; }; }