{ config, lib, pkgs, inputs, ... }:

let cfg = config.sydnix.users.msyds.emacs.plex-latex;
in {
  options.sydnix.users.msyds.emacs.plex-latex = {
    enable = lib.mkEnableOption "the IBM Plex font within Org-mode LaTeX";
  };

  config = lib.mkIf cfg.enable {
    sydnix.sydpkgs.overlay.enable = true;
    sydnix.emacs.tex.extraTexPackages = {
      inherit (pkgs) syd-plex-latex;
    };
  };
}
