Files
nix-los/home/modules/shell.nix

36 lines
834 B
Nix
Raw Normal View History

{ config, lib, ... }:
2026-04-07 02:34:03 +02:00
{
programs.zsh = {
enable = true;
dotDir = "${config.xdg.configHome}/zsh";
2026-04-07 02:34:03 +02:00
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
path = "${config.xdg.configHome}/zsh/zsh_history";
size = 10000;
save = 10000;
};
initContent = ''
bindkey '^R' history-incremental-search-backward
bindkey '^S' history-incremental-search-forward
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '%b'
setopt PROMPT_SUBST
PROMPT='%F{green}%n@%m%f:%F{blue}%~%f %F{240}''${vcs_info_msg_0_}%f %# '
2026-04-07 02:34:03 +02:00
'';
shellAliases = {
cat = "bat";
};
};
home.activation.createZshHistDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p "${config.xdg.configHome}/zsh"
'';
2026-04-07 02:34:03 +02:00
}