{ pkgs, ... }:
{
  programs.firefox = {
    enable = true;

    nativeMessagingHosts = with pkgs; [
      tridactyl-native
      keepassxc
    ];

    policies = {
      Homepage = {
        URL = "https://duckduckgo.com";
        StartPage = "homepage";
      };

      DisablePocket = true;
      DisableFirefoxAccounts = true;
      DisableAccounts = true;
      DisableFormHistory = true;
      OfferToSaveLogins = false;
      PasswordManagerEnabled = false;

      DisableSetDesktopBackground = true;
      DisableTelemetry = true;
      DisableFirefoxScreenshots = true;

      OverrideFirstRunPage = "https://duckduckgo.com";
      OverridePostUpdatePage = "https://duckduckgo.com";
      NewTabPage = false;

      DontCheckDefaultBrowser = true;
      DisplayBookmarksToolbar = "never";

      SearchBar = "unified";
      SearchSuggestEnabled = false;
      DownloadDirectory = "/home/lilith/sync/inbox";

      Containers = {
        "Default" = [
          {
            name = "Personal";
            icon = "circle";
            color = "pink";
          }
          {
            name = "Work";
            icon = "briefcase";
            color = "green";
          }
        ];
      };

      ExtensionSettings = {
        # uBlock Origin:
        "uBlock0@raymondhill.net" = {
          install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
          installation_mode = "force_installed";
        };

        "keepassxc-browser@keepassxc.org" = {
          install_url = "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi";
          installation_mode = "force_installed";
        };

        "sponsorBlocker@ajay.app" = {
          install_url = "https://addons.mozilla.org/firefox/downloads/file/4292214/sponsorblock-5.6.xpi";
          installation_mode = "force_installed";
        };

        "tridactyl.vim@cmcaine.co.uk" = {
          install_url = "https://addons.mozilla.org/firefox/downloads/file/4261352/tridactyl_vim-1.24.1.xpi";
          installation_mode = "force_installed";
        };
      };

      SearchEngines = {
        Default = "DuckDuckGo";
      };

      Preferences = {
        "browser.newtab.extensionControlled" = false;
        "browser.translations.neverTranslateLanguages" = true;
      };
    };
  };
}
