{ lib, pkgs, ... }: { home = { packages = with pkgs; [ # Version Control git jujutsu # Terminal # kitty # Broken (GLFWindow error) zsh fzf ]; username = "drew"; homeDirectory = "/home/drew"; stateVersion = "23.11"; }; programs = { home-manager.enable = true; git = { enable = true; userEmail = "dgalbraith33@gmail.com"; userName = "Drew Galbraith"; extraConfig = { core = { editor = "vim"; }; init.defaultBranch = "main"; }; }; zsh = { enable = true; history = { path = "$HOME/.zsh_history"; share = true; size = 10000; save = 10000; }; autosuggestion.enable = true; syntaxHighlighting.enable = true; shellAliases = { ls = "ls --color"; ll = "ls -al"; la = "ls -a"; config="/usr/bin/git --git-dir=/home/drew/.cfg/ --work-tree=/home/drew'"; }; sessionVariables = { EDITOR = "nvim"; PATH = "$HOME/.cargo/bin:$HOME/opt/cross/bin:$HOME/.local/bin:$PATH"; }; antidote = { enable = true; plugins = [ "zsh-users/zsh-autosuggestions kind:defer" ]; }; initExtraFirst = '' # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "$${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-$${(%):-%n}.zsh" ]]; then source "$${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-$${(%):-%n}.zsh" fi ''; initExtra = '' setopt extendedglob bindkey -v source <(fzf --zsh) eval $(dircolors ~/.dir_colors) # Bind keys typeset -g -A key bindkey -- "^[[H" beginning-of-line bindkey -- "^[[F" end-of-line bindkey -- "^[[1;5C" forward-word bindkey -- "^[[1;5D" backward-word bindkey -- "^[[3~" delete-char # Update cursor based on mode function zle-line-init zle-keymap-select { case $KEYMAP in vicmd) echo -n '\e[1 q';; viins|main) echo -n '\e[5 q';; esac } zle -N zle-line-init zle -N zle-keymap-select # Autocompletion. autoload -Uz compinit compinit zstyle ':completion:*' menu select source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme source ~/.nix-profile/etc/profile.d/hm-session-vars.sh # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh ''; }; }; xdg.configFile = { # Add kitty manually since there is an error with running it after installed with homemanager. "kitty/Tomorrow_Night_Eighties.conf".source = ./kitty/Tomorrow_Night_Eighties.conf; "kitty/kitty.conf".source = ./kitty/kitty.conf; }; home.file = { ".p10k.zsh".source = ./zsh/.p10k.zsh; }; }