2023-03-19 16:29:16 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.aa.tools.zsh;
|
|
|
|
in {
|
|
|
|
options.aa.tools.zsh = with types; {
|
|
|
|
enable = mkEnableOption "zsh";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-03-25 17:31:15 +00:00
|
|
|
# Already set in home-manager below, but without this building fails with
|
|
|
|
# an assertion error that suggests setting this
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
2023-03-19 16:29:16 +00:00
|
|
|
aa.home.extraOptions = {
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
2024-04-04 03:14:39 +00:00
|
|
|
autosuggestion.enable = true;
|
2023-03-19 16:29:16 +00:00
|
|
|
enableCompletion = true;
|
|
|
|
envExtra = ''
|
|
|
|
export PATH=~/.local/bin:$PATH
|
2023-03-26 15:37:59 +00:00
|
|
|
export EDITOR=nvim
|
2023-03-19 16:29:16 +00:00
|
|
|
'';
|
|
|
|
initExtra = ''
|
|
|
|
base16_darktooth
|
|
|
|
bindkey -v
|
|
|
|
bindkey '^A' beginning-of-line
|
|
|
|
bindkey '^E' end-of-line
|
|
|
|
bindkey '^R' history-incremental-search-backward
|
2023-03-26 15:37:59 +00:00
|
|
|
alias view="nvim -R $1"
|
2023-03-19 16:29:16 +00:00
|
|
|
alias l='ls -la'
|
|
|
|
'';
|
|
|
|
|
|
|
|
plugins = with pkgs; [
|
|
|
|
{
|
|
|
|
name = "zsh-syntax-highlighting";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zsh-users";
|
|
|
|
repo = "zsh-syntax-highlighting";
|
2023-03-26 17:02:24 +00:00
|
|
|
rev = "0.7.1";
|
|
|
|
sha256 = "sha256-gOG0NLlaJfotJfs+SUhGgLTNOnGLjoqnUp54V9aFJg8=";
|
2023-03-19 16:29:16 +00:00
|
|
|
};
|
|
|
|
file = "zsh-syntax-highlighting.zsh";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "powerlevel10k";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romkatv";
|
|
|
|
repo = "powerlevel10k";
|
2023-03-26 16:56:26 +00:00
|
|
|
rev = "v1.17.0";
|
|
|
|
sha256 = "sha256-fgrwbWj6CcPoZ6GbCZ47HRUg8ZSJWOsa7aipEqYuE0Q=";
|
2023-03-19 16:29:16 +00:00
|
|
|
};
|
|
|
|
file = "powerlevel10k.zsh-theme";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "powerlevel10k-config";
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
file = "p10k.zsh";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "base16-shell";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chriskempson";
|
|
|
|
repo = "base16-shell";
|
2023-03-26 17:20:10 +00:00
|
|
|
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
|
|
|
|
sha256 = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
|
2023-03-19 16:29:16 +00:00
|
|
|
};
|
|
|
|
file = "base16-shell.plugin.zsh";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|