{ inputs, outputs, lib, config, pkgs, ... }: let inherit (lib) mkEnableOption mkIf mkOption types; cfg = config.horseman.apps.visual.firefox; lock-false = { Value = false; Status = "locked"; }; lock-true = { Value = true; Status = "locked"; }; in { options = { horseman.apps.visual.firefox = { enable = mkEnableOption "Firefox"; }; }; config = { programs.firefox = { enable = true; policies = { DisableTelemetry = true; DisableFirefoxStudies = true; DisablePocket = true; DisableAccounts = true; DisableFirefoxScreenshots = true; DisplayBookmarksToolbar = "never"; PasswordManagerEnabled = false; 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"; }; # Dark Reader "addon@darkreader.org" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; installation_mode = "force_installed"; }; # Advent of Code delta-rank "{78b07db2-25ed-4088-9c92-5c5dcfca3c3c}" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/advent-of-code-delta-score/latest.xpi"; installation_mode = "force_installed"; }; # SponsorBlock "sponsorBlocker@ajay.app" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; installation_mode = "force_installed"; }; # KeepassXC "keepassxc-browser@keepassxc.org" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi"; installation_mode = "force_installed"; }; # Cookie Blocker "idcac-pub@guus.ninja" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/istilldontcareaboutcookies/latest.xpi"; installation_mode = "force_installed"; }; # Ghostery "firefox@ghostery.com" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/ghostery/latest.xpi"; installation_mode = "force_installed"; }; }; Preferences = { general = { autoScroll = true; }; "browser.newtabpage.activity-stream.showSponsored" = lock-false; "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; }; }; }; }; }