{ config, pkgs, lib, ... }: let cfg = config.dot.sh; in { options.dot.sh = { sourceProfile = lib.mkEnableOption "sourcing of $HOME/.profile in zsh profileExtra"; }; config = { programs.zsh = { enable = true; enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; history.size = 500000; prezto = { enable = true; caseSensitive = true; color = true; editor = { dotExpansion = true; keymap = "vi"; }; pmodules = [ "environment" "terminal" "editor" "history" "directory" "spectrum" "utility" "completion" "ssh" "syntax-highlighting" "history-substring-search" "prompt" "git" ]; prompt.theme = "minimal"; syntaxHighlighting.highlighters = [ "main" "brackets" "pattern" "line" "cursor" "root" ]; tmux = { autoStartLocal = true; itermIntegration = true; }; }; initContent = '' HISTCONTROL='erasedups:ignoreboth' HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear' unsetopt beep ''; profileExtra = lib.mkIf cfg.sourceProfile '' source $HOME/.profile ''; }; programs.fzf = { enable = true; enableZshIntegration = true; }; programs.lsd = { enable = true; enableZshIntegration = true; }; programs.zoxide = { enable = true; enableZshIntegration = true; options = [ "--cmd cd" ]; }; programs.bat.enable = true; programs.ripgrep.enable = true; programs.btop.enable = true; programs.ranger.enable = true; home.packages = with pkgs; [ fd dust glow ripgrep-all viddy duf ]; home.sessionVariables = { BAT_THEME = "Coldark-Cold"; }; home.shellAliases = { lst = "lsd --tree"; }; }; }