{ config, pkgs, ... }: let lock-false = { Value = false; Status = "locked"; }; lock-true = { Value = true; Status = "locked"; }; in { programs.firefox = { enable = true; policies = { EnableTrackingProtection = { Value = true; Locked = true; Cryptomining = true; Fingerprinting = true; }; # Certificates Certificates = { ImportEnterpriseRoots = true; }; # Cookies Cookies = { Behavior = "reject-foreign"; Locked = true; }; # DNS DNSOverHTTPS = { Enabled = false; Locked = true; }; # Disable Bad DisableAppUpdate = true; DisableAccounts = true; DisableFirefoxAccounts = true; DisableFirefoxScreenshots = true; DisableFirefoxStudies = true; DisablePoket = true; DisableTelemetry = true; AutofillAddressEnabled = false; AutofillCreditCardEnabled = false; # Disable Certain Messages UserMessaging = { WhatsNew = false; ExtensionRecommendations = false; FeatureRecommendations = false; UrlbarInterventions = false; SkipOnboarding = true; MoreFromMozilla = false; Locked = true; }; # Disable Password Manager PasswordManagerEnabled = false; OfferToSaveLogins = false; OfferToSaveLoginsDefault = false; # Remove Special Pages OverrideFirstRunPage = ""; OverridePostUpdatePage = ""; # Start Page Homepage = { StartPage = "previous-session"; Loked = true; }; # Home Page FirefoxHome = { Search = true; TopSites = false; SponsoredTopSites = false; Highlights = false; Pocket = false; SponsoredPocket = false; Snippets = false; Locked = true; }; # Search Suggestions FirefoxSuggest = { WebSuggestions = false; SponsoredSuggestions = false; ImproveSuggest = false; Locked = true; }; # Save All on Shutdown SanitizeOnShutdown = { Cache = false; Cookies = false; Downloads = false; Histroy = false; Sessions = false; SiteSettings = false; OfflineApps = false; Locked = true; }; # Miscellaneous SearchBar = "unified"; DisplayMenuBar = "default-off"; DisplayBookmarksToolbar = "newtab"; NoDefaultBookmarks = true; HardwareAcceleration = true; DontCheckDefaultBrowser = true; PromptForDownloadLocation = false; # Extensions ExtensionSettings = { "*".installation_mode = "blocked"; # uBlock Origin "uBlock0@raymondhill.net" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; installation_mode = "force_installed"; }; # Bitwarden "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; installation_mode = "force_installed"; }; }; # about:config Preferences Preferences = { # theme "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; # privacy "privacy.donottrack.enabled" = lock-true; "privacy.fingerprintingProtection" = lock-false; "privacy.globalprivacycontrol.enabled" = lock-true; # security "security.OCSP.enabled" = { Value = 0; Status = "locked"; }; "browser.contentblocking.category" = { Value = "strict"; Status = "locked"; }; # graphics "webgl.disable" = lock-false; "dom.webgpu.enabled" = lock-true; "media.eme.enabled" = lock-true; # tabs "browser.tabs.warnOnClose" = lock-true; "browser.tabs.firefox-view" = lock-false; # user messaging "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; "browser.newtabpage.activity-stream.showSponsored" = lock-false; "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; }; }; }; }