Merge branch 'zsh-fast' into 'main'

zsh is fast now

See merge request https://git.cything.io/cy/infra/-/merge_requests/5
This commit is contained in:
cy 2024-12-25 04:58:40 +00:00
commit 18e0c512d7
3 changed files with 13 additions and 20 deletions

View file

@ -2,7 +2,7 @@
{
imports = [
../tmux.nix
../fish.nix
../zsh
];
home.sessionVariables = {

View file

@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
@ -9,28 +9,22 @@
"completion"
];
};
enableCompletion = true;
syntaxHighlighting = {
enable = true;
highlighters = [ "brackets" ];
};
autocd = true;
defaultKeymap = "emacs";
antidote = {
enable = true;
useFriendlyNames = true; # why not?
plugins = [
"zsh-users/zsh-completions"
"romkatv/powerlevel10k"
"Aloxaf/fzf-tab"
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages"
];
};
initExtraFirst = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
history = {
ignoreDups = true;
ignoreAllDups = true;
ignoreSpace = true;
save = 50000;
size = 50000;
save = 10000;
size = 10000;
append = true;
};
historySubstringSearch = {
@ -40,10 +34,6 @@
};
initExtra = ''
source ${./p10k.zsh}
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-prewview 'ls $realpath'
#disable control+s to pause terminal
unsetopt FLOW_CONTROL

View file

@ -26,6 +26,9 @@
programs.command-not-found.enable = false;
programs.nix-index.enable = true;
users.users.yt.shell = pkgs.fish;
programs.fish.enable = true;
users.users.yt.shell = pkgs.zsh;
programs.zsh.enable = true;
# needed for zsh.enableCompletion to work
environment.pathsToLink = [ "/share/zsh" ];
}