nix-dotfiles/programs/zsh/default.nix

65 lines
1.4 KiB
Nix
Raw Normal View History

2022-03-07 16:01:52 +01:00
{ pkgs, lib, config, shellOptions, ... }:
{
programs.zsh = rec {
enable = true;
dotDir = ".config/zsh";
# enableSyntaxHighlighting = true;
defaultKeymap = "viins";
plugins = [
# {
# name = "nix-zsh-shell-integration";
2022-06-11 19:59:28 +02:00
# src = pkgs.nix-zsh-shell;
2022-03-07 16:01:52 +01:00
# }
{
name = "zsh-fast-syntax-highlighting";
src = pkgs.zsh-fast-syntax-highlighting;
}
{
name = "zsh-completions";
src = pkgs.zsh-completions;
}
{
name = "zsh-you-should-use";
src = pkgs.zsh-you-should-use;
}
{
name = "zsh-autosuggestions";
src = pkgs.zsh-autosuggestions;
}
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
2022-06-11 19:59:28 +02:00
{
name = "fzf-tab";
src = pkgs.zsh-fzf-tab;
}
2022-03-07 16:01:52 +01:00
];
localVariables = shellOptions.variables;
shellAliases = shellOptions.flattened.aliases;
# initExtra = let
# functions = {
# # TODO: make 'join' available.
# md-to-pdf = join [
# "pandoc \"$1\""
# "-f gfm"
# "-V linkcolor:blue"
# "-V geometry:a4paper"
# "-V geometry:margin=2cm"
# "-V mainfont=\"Droid Sans\""
# "--pdf-engine=xelatex"
# "-o \"$2\""
# ];
# };
# in ''
initExtra = ''
source ${./p10k.zsh}
'';
};
}