41 lines
918 B
Nix
41 lines
918 B
Nix
{ pkgs, config, ... } :
|
|
let
|
|
wrapPlugin = { name, pkg }: {
|
|
inherit name;
|
|
src = pkg + "/share/zsh/site-functions";
|
|
};
|
|
in {
|
|
|
|
home.packages = [
|
|
pkgs.swatch
|
|
];
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableAutosuggestions = true;
|
|
enableCompletion = true;
|
|
dotDir = ".config/zsh";
|
|
history = {
|
|
expireDuplicatesFirst = true;
|
|
extended = true;
|
|
ignoreDups = true;
|
|
share = true;
|
|
};
|
|
initExtra = ''
|
|
setopt promptsubst
|
|
autoload -U colors && colors
|
|
export PROMPT='%{$fg[white]%}%B$(swatch)%b %{$fg[blue]%}%2~ %{$fg[green]%}%B>%b '
|
|
'';
|
|
shellAliases = {
|
|
nf = "neofetch --gtk2 off --gtk3 off --ascii_bold on";
|
|
ls = "ls --color";
|
|
};
|
|
plugins = (map wrapPlugin [
|
|
{ name = "fast-syntax-highlighting";
|
|
pkg = pkgs.zsh-fast-syntax-highlighting;
|
|
}
|
|
]);
|
|
};
|
|
programs.dircolors.enableZshIntegration = true;
|
|
}
|