2024-07-29 03:51:41 +00:00
|
|
|
{
|
|
|
|
config,
|
2024-08-01 03:03:15 +00:00
|
|
|
inputs,
|
2024-07-29 03:51:41 +00:00
|
|
|
lib,
|
|
|
|
namespace,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) mkEnableOption mkIf;
|
|
|
|
|
|
|
|
cfg = config.${namespace}.tools.zsh;
|
|
|
|
in {
|
|
|
|
options.${namespace}.tools.zsh = {
|
|
|
|
enable = mkEnableOption "zsh";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
autosuggestion.enable = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
envExtra = ''
|
|
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
export EDITOR=nvim
|
|
|
|
'';
|
|
|
|
initExtra = ''
|
|
|
|
bindkey -v
|
|
|
|
bindkey '^A' beginning-of-line
|
|
|
|
bindkey '^E' end-of-line
|
|
|
|
bindkey '^R' history-incremental-search-backward
|
|
|
|
alias view="nvim -R $1"
|
|
|
|
alias l='ls -la'
|
|
|
|
'';
|
|
|
|
|
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "zsh-syntax-highlighting";
|
2024-08-01 03:03:15 +00:00
|
|
|
src = inputs.zsh-syntax-highlighting;
|
2024-07-29 03:51:41 +00:00
|
|
|
file = "zsh-syntax-highlighting.zsh";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "powerlevel10k";
|
2024-08-01 03:03:15 +00:00
|
|
|
src = inputs.powerlevel10k;
|
2024-07-29 03:51:41 +00:00
|
|
|
file = "powerlevel10k.zsh-theme";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "powerlevel10k-config";
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
file = "p10k.zsh";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|