nixos-config/modules/zsh.nix
2022-06-06 03:19:52 +02:00

31 lines
842 B
Nix

with import <nixpkgs> {};
{
enable = true;
interactiveShellInit = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
# Make user colour green in prompt instead of default blue
#zstyle ':prompt:grml:left:items:user' pre '%F{green}%B'
export QUOTING_STYLE=literal
'';
promptInit = ""; # otherwise it'll override the grml prompt
syntaxHighlighting = {
enable = true;
highlighters = [ "main" "pattern" "brackets" ];
};
autosuggestions = {
enable = true;
highlightStyle = "fg=cyan";
};
shellAliases = {
"l" = "exa -lg";
"lh" = "command ls -hAl --color=auto";
"s" = "systemctl";
"ip" = "ip -c";
"n" = "cd /etc/nixos";
"nt" = "(cd /tmp && nixos-rebuild test)";
"ns" = "nixos-rebuild switch";
"nsu" = "nixos-rebuild switch --upgrade";
};
}
# vim: set et ts=2 sw=2 ai: