{ config, lib, pkgs, ... }: with lib; with lib.my; let cfg = config.modules.shell.zsh; in { options.modules.shell.zsh = { enable = mkBoolOpt false; }; config = mkIf cfg.enable { users.defaultUserShell = pkgs.zsh; programs.zsh = { enable = true; enableCompletion = true; }; user.packages = with pkgs; [ fd fzf jq nix-zsh-completions nnn ripgrep zsh zsh-autosuggestions zsh-fast-syntax-highlighting zsh-history-substring-search ]; env = { ZDOTDIR = "$XDG_CONFIG_HOME/zsh"; ZSH_CACHE = "$XDG_CACHE_HOME/zsh"; }; home.configFile = { "zsh" = {}; }; }; }