{ pkgs, config, ... }: { programs.zsh = { enable = true; enableCompletion = true; enableAutosuggestions = true; enableSyntaxHighlighting = true; # History settings history = { size = 5000; path = "${config.xdg.stateHome}/zsh/history"; ignoreDups = true; ignoreAllDups = true; ignoreSpace = true; share = true; extended = true; }; autosuggestion = { enable = true; }; # Shell options initExtra = '' # Keybindings bindkey -e bindkey '^p' history-search-backward bindkey '^n' history-search-forward bindkey '^[w' kill-region # Bind Home key to beginning-of-line bindkey '^[[H' beginning-of-line bindkey '^[[1~' beginning-of-line # Bind End key to end-of-line bindkey '^[[F' end-of-line bindkey '^[[4~' end-of-line # Bind Delete key to delete-char bindkey '^[[3~' delete-char # Terminal settings export TERM=xterm-256color ''; # Aliases shellAliases = { ls = "eza"; ll = "eza -alh"; tree = "eza --tree"; dcupd = "docker compose up -d --remove-orphans"; dcdown = "docker compose down"; dclogs = "docker logs -f --tail 100"; vi = "nvim"; vim = "nvim"; lg = "lazygit"; ".." = "cd .."; "..." = "cd ../.."; update = "sudo nixos-rebuild switch"; }; }; programs.oh-my-posh = { enable = true; enableZshIntegration = true; package = pkgs.oh-my-posh; settings = builtins.fromJSON (builtins.readFile ./oh-my-posh/config.json); }; programs.fzf = { enable = true; enableZshIntegration = true; }; programs.zoxide = { enable = true; enableZshIntegration = true; options = ["--cmd" "cd"]; }; programs.eza = { enable = true; }; home.packages = with pkgs; [ zsh-syntax-highlighting zsh-fzf-tab zsh-completions ]; }