{lib, ...}: { home-manager.sharedModules = [ { # System wide firefox settings programs.firefox = { enable = true; policies = { DisableTelemetry = true; GenerativeAI = { Chatbot = false; LinkPreviews = false; TabGroups = false; Locked = true; }; # You need these for Spotify EncryptedMediaExtensions.Enabled = true; ExtensionSettings = { # TODO: Install extensions the NUR instead of from AMO "uBlock0@raymondhill.net" = { installation_mode = "force_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; }; # Decentraleyes "jid1-BoFifL9Vbdl2zQ@jetpack" = { installation_mode = "normal_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi"; }; "jid1-MnnxcxisBPnSXQ@jetpack" = { installation_mode = "normal_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi"; }; # Uninstall undeclared extensions "*" = { installation_mode = "blocked"; blocked_install_message = "Extensions are managed by home-manager"; }; }; Preferences = { # Enable video hardware acceleration "media.ffmpeg.vaapi.enabled" = { Value = true; Status = "default"; }; "dom.security.https_only_mode" = { Value = true; Status = "locked"; }; "browser.ml.chat.page" = { Value = false; Status = "Locked"; }; }; PromptForDownloadLocation = true; # I use an external password manager, so the built in one just bothers me PasswordManagerEnabled = false; Permissions = { Autoplay = { Allow = [ "https://www.youtube.com" "https://sync-tube.de" ]; Default = "block-audio-video"; }; }; FirefoxHome.SponsoredTopSites = false; }; }; } ]; # Per-user settings home-manager.users.toast = { programs.firefox.policies = { DisablePocket = true; ExtensionSettings = { "sponsorBlocker@ajay.app" = { installation_mode = "normal_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; }; "@testpilot-containers" = { installation_mode = "normal_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/multi-account-containers/latest.xpi"; }; }; Preferences = { "general.smoothScroll.msdPhysics.enabled" = { Value = true; Status = "default"; }; "browser.ctrlTab.sortByRecentlyUsed" = { Value = true; Status = "default"; }; # This should be set automatically, but it isn't for some reason "extensions.webextensions.ExtensionStorageIDB.enabled" = { Value = false; Status = "locked"; }; }; }; programs.firefox.profiles = { personal = { name = "Personal"; id = 0; isDefault = true; containersForce = true; containers = { work = { name = "Work"; id = 1; icon = "briefcase"; color = "green"; }; }; extensions.force = true; extensions.settings = { "@testpilot-containers".settings = { onboarding-stage = 8; "siteContainerMap@@_teams.microsoft.com" = { userContextId = "1"; neverAsk = false; identityMacAddonUUID = "b50e5b1e-6f3b-4245-8eac-5654d889156e"; }; "siteContainerMap@@_outlook.office.com" = { userContextId = "1"; neverAsk = false; identityMacAddonUUID = "b50e5b1e-6f3b-4245-8eac-5654d889156e"; }; }; }; }; }; }; }