{pkgs, ...}: let inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; in { programs.zsh = { enable = true; initExtraFirst = '' autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zmv colors add-zle-hook-widget compinit compinit zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search export ZSH_CACHE_DIR="$HOME/.cache/zsh" typeset -U path PATH ''; initExtra = builtins.readFile ../../../../zsh/zshrc; antidote = { enable = true; plugins = let ohmyzsh-lib = "ohmyzsh/oh-my-zsh path:lib"; ohmyzsh-plugin = "ohmyzsh/oh-my-zsh path:plugins"; extraPlugins = if isLinux then [] else if isDarwin then [ "${ohmyzsh-plugin}/brew" ] else []; in extraPlugins ++ [ "zdharma-continuum/fast-syntax-highlighting" "zsh-users/zsh-completions" "b4b4r07/zsh-vimode-visual" "reegnz/jq-zsh-plugin" "${ohmyzsh-lib}/completion.zsh" "${ohmyzsh-lib}/git.zsh" "${ohmyzsh-plugin}/1password" "${ohmyzsh-plugin}/aws" "${ohmyzsh-plugin}/colored-man-pages" "${ohmyzsh-plugin}/docker" "${ohmyzsh-plugin}/docker-compose" "${ohmyzsh-plugin}/emoji" "${ohmyzsh-plugin}/fd kind:fpath" "${ohmyzsh-plugin}/gh" "${ohmyzsh-plugin}/git" "${ohmyzsh-plugin}/gitignore" "${ohmyzsh-plugin}/gradle" "${ohmyzsh-plugin}/helm" "${ohmyzsh-plugin}/isodate" "${ohmyzsh-plugin}/mix-fast" "${ohmyzsh-plugin}/mosh" "${ohmyzsh-plugin}/mvn" "${ohmyzsh-plugin}/nmap" "${ohmyzsh-plugin}/rsync" "${ohmyzsh-plugin}/rust" ]; useFriendlyNames = true; }; dirHashes = { "-- -dotfiles" = "$HOME/.dotfiles"; "-- -src" = "$HOME/src"; "-- -doom" = "$HOME/.emacs.d"; }; autocd = false; history = { path = "$HOME/.histfile"; size = 10000; save = 10000; ignoreAllDups = true; ignoreSpace = true; }; sessionVariables = { COMPLETION_WAITING_DOTS = true; VISUAL = "nvim"; EDITOR = "nvim"; RPROMPT = "' '"; # Fixes a side-effect of the vi-mode oh-my-zsh plugin KEYTIMEOUT = 1; AGE = "rage"; AGE_KEYPATH = "op://Jellyfish/age-key"; }; shellAliases = let platformSpecificAliases = if isLinux then { cp = "cp --reflink=auto"; } else { # exa = "eza -l --git"; # ls = "exa"; nv = "neovide --fork"; }; in {zj = "zellij -l welcome";} // platformSpecificAliases; }; programs.carapace = { enable = true; enableZshIntegration = true; }; }