nix-user/zsh.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2022-03-05 17:27:25 +01:00
{ config, pkgs, lib, ... }:
{
programs.zsh = {
enable = true;
histSize = 10000;
autosuggestions.enable = true;
enableBashCompletion = true;
syntaxHighlighting.enable = true;
promptInit = ''
source ~/.zkbd/$TERM-''${''${DISPLAY:t}:-''$VENDOR-''$OSTYPE}
[[ -n ''${key[Left]} ]] && bindkey "''${key[Left]}" backward-char
[[ -n ''${key[Right]} ]] && bindkey "''${key[Right]}" forward-char
bindkey "''${key[Up]}" up-line-or-search
bindkey "''${key[Home]}" beginning-of-line
bindkey "''${key[End]}" end-of-line
bindkey "''${key[Delete]}" delete-char
function command_not_found_handler() { command-not-found $1 }
2022-03-05 19:37:36 +01:00
export $(gnome-keyring-daemon --components=ssh,secrets,pkcs11 --start)
2022-03-05 17:27:25 +01:00
alias cat='bat'
eval "$(starship init zsh)"
'';
};
programs.starship = {
enable = true;
settings = {
# add_newline = false;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
# package.disabled = true;
};
};
}