{
  pkgs,
  lib,
  config,
  ...
}: let
  browser = ["chromium.desktop"];

  associations = {
    "text/html" = browser;
    "x-scheme-handler/http" = browser;
    "x-scheme-handler/https" = browser;
    "x-scheme-handler/ftp" = browser;
    "x-scheme-handler/about" = browser;
    "x-scheme-handler/unknown" = browser;
    "application/x-extension-htm" = browser;
    "application/x-extension-html" = browser;
    "application/x-extension-shtml" = browser;
    "application/xhtml+xml" = browser;
    "application/x-extension-xhtml" = browser;
    "application/x-extension-xht" = browser;

    "audio/*" = ["mpv.desktop"];
    "video/*" = ["mpv.dekstop"];
    "image/*" = ["imv.desktop"];
    "application/json" = browser;
    #"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
    #"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
    #"x-scheme-handler/spotify" = ["spotify.desktop"];
    #"x-scheme-handler/discord" = ["WebCord.desktop"];
  };

  # texlive = pkgs.texlive.combine {
  #   inherit
  #     (pkgs.texlive)
  #     scheme-small
  #     noto
  #     mweights
  #     cm-super
  #     cmbright
  #     fontaxes
  #     beamer
  #     ;
  # };
  
in {
  # home.packages = [texlive];
  services = {
    gpg-agent = {
      enable = true;
      pinentryPackage = pkgs.pinentry-gnome3;
      enableSshSupport = true;
      enableZshIntegration = true;
    };
  };
  programs = {
    gpg.enable = true;
    man.enable = true;
    direnv = {
      enable = true;
      nix-direnv.enable = true;
    };
    tealdeer = {
      enable = true;
      settings = {
        display = {
          compact = false;
          use_pager = true;
        };
        updates = {
          auto_update = true;
        };
      };
    };
    bat.enable = true;
  };
  xdg = {
    userDirs = {
      enable = true;
      documents = "$HOME/documents";
      download = "$HOME/downloads";
      videos = "$HOME/misc/videos";
      music = "$HOME/misc/music";
      pictures = "$HOME/misc/pictures";
      desktop = "$HOME/misc/desktop";
      publicShare = "$HOME/misc/public";
      templates = "$HOME/misc/templates";
    };
    mimeApps.enable = true;
    mimeApps.associations.added = associations;
    mimeApps.defaultApplications = associations;
  };
}
