add zsh and kitty. Basic structure

This commit is contained in:
2025-11-14 01:08:32 +03:00
parent fe3ff1f1cb
commit 737507ced7
10 changed files with 2168 additions and 0 deletions
+96
View File
@@ -0,0 +1,96 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
zsh-powerlevel10k
fzf
fd
];
programs.zsh = {
loginShell = true;
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "powerlevel10k/powerlevel10k"; # agnoster refined nicoulaj
plugins = [
"git"
"python"
"ssh"
"eza"
"zoxide"
"fzf"
"command-not-found"
"colored-man-pages"
];
};
shellAliases = {
ll = "ls -lh";
la = "ls -la";
".." = "cd ..";
c = "clear";
addpath = "export PATH=$PATH:$1";
tree = "eza --tree";
"..." = "cd ../..";
gcapush = "f() { git add -A && git commit -m \"$1\" && git push; }; f";
};
initExtraBeforeCompInit = ''
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
'';
initExtra = ''
zstyle ':omz:plugins:eza' 'git-status' yes
zstyle ':omz:plugins:eza' 'header' yes
zstyle ':omz:plugins:eza' 'icons' yes
ZOXIDE_CMD_OVERRIDE=cd
### --- HISTORY SETTINGS ------------------------------
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt SHARE_HISTORY
### --- COMPLETION TUNING -----------------------------
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ""
### --- KEYBINDINGS ----------------------------------
# bindkey -e # Emacs-style bindings
# bindkey -v # Vim-style bindings
### --- ENVIRONMENT VARS ------------------------------
export EDITOR="nvim"
export VISUAL="nvim"
export PAGER="less"
export LESS="-R"
# --- fzf configuration ---
if command -v fzf >/dev/null 2>&1; then
# Enable key bindings and auto-completion
[ -f "${pkgs.fzf}/share/fzf/key-bindings.zsh" ] && source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
[ -f "${pkgs.fzf}/share/fzf/completion.zsh" ] && source "${pkgs.fzf}/share/fzf/completion.zsh"
# Example of optional fzf tuning
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
fi
'';
};
home.file.".config/zsh/p10k.zsh".source = ./p10k.zsh;
home.file.".p10k.zsh".source = config.home.homeDirectory + "/.config/zsh/p10k.zsh";
}