{
  self,
  inputs,
  moduleWithSystem,
  ...
}: {
  flake.nixosModules.zsh = moduleWithSystem ({
    pkgs,
    self',
    ...
  }: {
    nixpkgs.overlays = [
      (final: prev: {
        zsh = self'.packages.zsh;
      })
    ];
    programs.zsh = {
      enable = true;
      enableCompletion = true;
      enableBashCompletion = true;
      autosuggestions.enable = true;
      syntaxHighlighting.enable = true;
      histSize = 10000;
    };
    users.defaultUserShell = pkgs.zsh;
  });
  perSystem = {
    pkgs,
    lib,
    self',
    ...
  }: {
    packages = {
      zsh = inputs.wrappers.wrappers.zsh.wrap {
        inherit pkgs;
        runtimePkgs = [pkgs.carapace];
        zshAliases = {
          ls = "${lib.getExe pkgs.lsd} -l";
          cat = lib.getExe pkgs.bat;
          lg = lib.getExe pkgs.lazygit;
          devenv = lib.getExe pkgs.devenv;
          carapace = lib.getExe pkgs.carapace;
          man = "man -P \"${lib.getExe pkgs.bat} -p\"";
          nsh = "nix-shell -p";
        };
        zshrc.content = ''
          autoload -U compinit && compinit
          export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
          zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
          source <(${lib.getExe pkgs.carapace} _carapace)
          zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'

          setopt NO_CASE_GLOB

          export EDITOR=nvim

          eval "$(${lib.getExe pkgs.devenv} hook zsh)"
          eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)"

          ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin
        '';
      };
      ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {
        inherit pkgs;
        configFile = ./config.toml;
      };
    };
  };
}
