70 lines
2 KiB
Nix
70 lines
2 KiB
Nix
{ ... }:
|
|
{
|
|
# Zsh itself
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
autosuggestion = {
|
|
enable = true;
|
|
strategy = [ "completion" ];
|
|
};
|
|
|
|
syntaxHighlighting = {
|
|
enable = true;
|
|
highlighters = [ "main" "brackets" "cursor" "line" ];
|
|
};
|
|
|
|
initExtra = ''
|
|
bindkey "^[[H" beginning-of-line
|
|
bindkey "^[[F" end-of-line
|
|
bindkey "^[[3~" delete-char
|
|
bindkey "^[[1;5C" forward-word
|
|
bindkey "^[[1;5D" backward-word
|
|
bindkey "5~" kill-word
|
|
bindkey "^H" backward-kill-word
|
|
bindkey "^Z" undo
|
|
'';
|
|
|
|
# Disable saving the history file, as it is handled by atuin
|
|
history = {
|
|
# Tell it to not save anything to disk
|
|
save = 0;
|
|
# If it still tries to save anything, have it write to /dev/null instead just in case
|
|
path = "/dev/null";
|
|
# We leave size at the default to allow zsh to have command history in memory
|
|
# for features like !! or !cmdname, but simply have it stop writing to disk
|
|
size = 10000;
|
|
};
|
|
};
|
|
|
|
# Atuin shell history
|
|
programs.atuin = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
settings = {
|
|
dialect = "us";
|
|
auto_sync = true;
|
|
update_check = false;
|
|
sync_address = "https://atuin.myriation.xyz";
|
|
sync_frequency = "0";
|
|
search_mode = "fuzzy";
|
|
filter_mode = "global";
|
|
style = "full";
|
|
invert = false;
|
|
show_help = true;
|
|
exit_mode = "return-query";
|
|
store_failed = true;
|
|
secrets_filter = true;
|
|
enter_accept = false;
|
|
|
|
stats = {
|
|
common_prefix = [ "sudo" "doas" ];
|
|
};
|
|
|
|
sync = {
|
|
records = true;
|
|
dotfiles = false;
|
|
};
|
|
};
|
|
};
|
|
}
|