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,
|
2024-09-21 05:43:30 +00:00
|
|
|
pkgs,
|
2024-07-29 03:51:41 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2024-09-21 05:43:30 +00:00
|
|
|
shellAliases = {
|
|
|
|
view = "${pkgs.neovim}/bin/nvim -R $1";
|
|
|
|
l = "ls -la";
|
|
|
|
};
|
|
|
|
|
2024-07-29 03:51:41 +00:00
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-09-18 02:34:27 +00:00
|
|
|
|
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
|
|
|
catppuccin.enable = true;
|
2024-09-18 04:09:53 +00:00
|
|
|
settings = {
|
2024-09-18 05:33:31 +00:00
|
|
|
format = lib.concatStrings [
|
|
|
|
"$os"
|
|
|
|
"$username"
|
|
|
|
"$hostname"
|
|
|
|
"$directory"
|
|
|
|
"$git_branch"
|
|
|
|
"$git_commit"
|
|
|
|
"$git_state"
|
|
|
|
"$git_metrics"
|
|
|
|
"$git_status"
|
|
|
|
"$fill"
|
|
|
|
"$all"
|
|
|
|
"$time"
|
|
|
|
"$line_break"
|
|
|
|
"$character"
|
|
|
|
];
|
2024-09-18 04:09:53 +00:00
|
|
|
|
|
|
|
os.disabled = false;
|
|
|
|
status.disabled = false;
|
|
|
|
time.disabled = false;
|
|
|
|
};
|
2024-09-18 02:34:27 +00:00
|
|
|
};
|
2024-07-29 03:51:41 +00:00
|
|
|
};
|
|
|
|
}
|