{
  pkgs,
  lib,
  config,
  ...
}: let
  cfg = config.mods.terminal;
in
  with lib; {
    options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";

    config = mkIf cfg.tools.enable {
      programs =
        builtins.listToAttrs (map (name: {
            name = name;
            value =
              {
                enable = true;
              }
              // optionalAttrs
              (builtins.hasAttr "enableZshIntegration" config.programs.${name}) {
                enableZshIntegration = mkIf cfg.zsh.enable true;
              };
          }) [
            "zellij"
            "fzf"
            "eza"
            "bat"
            "zoxide"
            "dircolors"
            "nix-index"

            "lazygit"
            "fd"
            "ripgrep"
            "bottom"
            "htop"
            "vifm"
            "rbw"
          ])
        // {
          atuin = {
            enable = true;
            enableZshIntegration = true;
            flags = ["--disable-up-arrow"];
            settings = {
              sync_frequency = "5m";
              sync_address = "https://atuin.muon.host";
              key_path = config.sops.secrets.atuin-auth.path;
              keymap_mode = "vim-insert";
              keymap_cursor = {
                vim_insert = "blink-bar";
                vim_normal = "steady-block";
              };
            };
          };
        };

      home.packages = with pkgs; [
        # libraries
        glow
        ueberzugpp

        # file managing
        trash-cli
        dua
        fdupes
        vifm
        unzip

        # email
        aerc

        # security
        pinentry-tty

        # utilities
        fend
        xclip
        just
        devenv
      ];
    };
  }
