/ zsh.nix
zsh.nix
1 { 2 pkgs, 3 config, 4 ... 5 }: { 6 environment.systemPackages = with pkgs; [ 7 fzf-zsh 8 oh-my-zsh 9 ripgrep 10 zsh 11 ]; 12 13 programs.zsh = { 14 ohMyZsh = { 15 enable = true; 16 plugins = [ 17 "cargo" 18 "fzf" 19 "git" 20 "man" 21 "ripgrep" 22 "rustup" 23 "stack" 24 ]; 25 theme = "half-life"; 26 customPkgs = [ 27 pkgs.nix-zsh-completions 28 ]; 29 }; 30 enable = true; 31 enableCompletion = true; 32 interactiveShellInit = '' 33 export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh/ 34 35 # Customize your oh-my-zsh options here 36 ZSH_THEME="half-life" 37 plugins=(git) 38 39 HISTFILESIZE=50000 40 HISTSIZE=50000 41 setopt SHARE_HISTORY 42 setopt HIST_IGNORE_ALL_DUPS 43 setopt HIST_IGNORE_DUPS 44 setopt INC_APPEND_HISTORY 45 autoload -U compinit && compinit 46 unsetopt menu_complete 47 setopt completealiases 48 49 [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 50 51 if [ -f ~/.aliases ]; then 52 source ~/.aliases 53 fi 54 55 source $ZSH/oh-my-zsh.sh 56 ''; 57 }; 58 }