{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.alqueva.shells.zsh;

  inherit (lib.modules) mkIf;
  inherit (lib.options) mkEnableOption mkPackageOption;
in
{
  options.alqueva.shells.zsh = {
    enable = mkEnableOption "zsh";
    package = mkPackageOption pkgs "zsh" { };
  };
  config = mkIf cfg.enable {
    environment = {
      systemPackages = [ cfg.package ];
      shells = [ cfg.package ];
    };

    programs.zsh = {
      enable = true;
      enableCompletion = true;
      syntaxHighlighting.enable = true;
      autosuggestions.enable = true;
    };
  };
}
