{ config, lib, ... }:

let
  inherit (lib) mkOption types;
  cfg = config.termtools;
in
{
  imports = [ ./subs/tmux.nix ];
  options.termtools = {
    tmux.enable = mkOption {
      default = true;
      type = types.bool;
    };
    zoxide.enable = mkOption {
      default = true;
      type = types.bool;
    };
  };

  config = {
    subs.tmux.enable = cfg.tmux.enable;
    programs.zoxide = {
      enable = cfg.zoxide.enable;
      enableZshIntegration = true;
      enableBashIntegration = true;
      options = [ "--cmd cd" ];
    };
  };
}
