{
  pkgs,
  lib,
  config,
  ...
}: let
  inherit (lib) mkEnableOption mkIf;
  cfg = config.my.zsh;
in {
  options.my.zsh = {
    enable = mkEnableOption "zsh";
  };

  config = mkIf cfg.enable {
    hm.my.zsh.enable = true;

    programs.zsh = {
      enable = true;
    };

    environment.variables.EDITOR = "nvim";

    users.users."${config.my.user}".shell = pkgs.zsh;
  };
}