{ config, pkgs, lib, inputs, ... }: let # Firefox Profile Setting States lock-false = { Value = false; Status = "locked"; }; lock-true = { Value = true; Status = "locked"; }; lock-empty-string = { Value = ""; Status = "locked"; }; in { programs.firefox = { enable = true; nativeMessagingHosts = []; # pkgs.firefoxpwa removed. I use ungoogled-chromiums PWA Implementation for better stability. policies = { # --------- Privacy --------- DisableTelemetry = true; DisableFirefoxStudies = true; DisablePocket = true; DisableFirefoxAccounts = true; AutofillAddressEnabled = false; AutofillCreditCardEnabled = false; OfferToSaveLogins = false; FirefoxHome.TopSites = false; FirefoxHome.SponsoredTopSites = false; Preferences = { "browser.newtabpage.pinned" = lock-empty-string; "browser.topsites.contile.enabled" = lock-false; }; # -------- Opiniated -------- DontCheckDefaultBrowser = true; DisableProfileImport = true; SearchBar = "unified"; SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add { Name = "Brave"; URLTemplate = "https://search.brave.com/search?q={searchTerms}"; Alias = "br"; IconURL = "https://cdn.search.brave.com/serp/v3/_app/immutable/assets/brave-search-icon.CsIFM2aN.svg"; } ]; # Extensions https://mozilla.github.io/policy-templates#extensionsettings ExtensionSettings = { "uBlock0@raymondhill.net" = { # uBlock Origin: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin install_url = "https://addons.mozilla.org/firefox/downloads/file/4458450/ublock_origin-1.63.2.xpi"; installation_mode = "normal_installed"; private_browsing = true; }; "idcac-pub@guus.ninja" = { # I still don't care about cookies: https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/ install_url = "https://addons.mozilla.org/firefox/downloads/file/4216095/istilldontcareaboutcookies-1.1.4.xpi"; installation_mode = "normal_installed"; private_browsing = true; }; "keepassxc-browser@keepassxc.org" = { # KeePassXC-Browser: https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser install_url = "https://addons.mozilla.org/firefox/downloads/file/4441759/keepassxc_browser-1.9.7.xpi"; installation_mode = "normal_installed"; }; }; }; }; }