initial
This commit is contained in:
75
hosts/dunamis/users/user/programs/shell/zsh.nix
Normal file
75
hosts/dunamis/users/user/programs/shell/zsh.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
zsh.enable =
|
||||
lib.mkEnableOption "enable z shell";
|
||||
};
|
||||
config = lib.mkIf config.zsh.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
initExtra = ''
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
'';
|
||||
# promptInit = "oh-my-posh init zsh -c ~/.config/oh-my-posh/zen.toml";
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
#autosuggestion.highlight = "fg=#ff00ff,bg=cyan,bold,underline";
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
l = "eza -alh";
|
||||
};
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-autosuggestions";
|
||||
file = "zsh-autosuggestions.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autocomplete";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.8.0";
|
||||
sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-history-substring-search";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "v1.1.0";
|
||||
sha256 = "sha256-GSEvgvgWi1rrsgikTzDXokHTROoyPRlU0FVpAoEmXG4=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsin.fromh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user