Files
nixos/packages/zsh/default.nix
T
biscuit f3859db703 sync
2025-05-13 13:00:11 -05:00

44 lines
1.5 KiB
Nix

{ pkgs, ... }: {
programs.zsh = {
enable = true;
plugins = [
{
name = "zsh-autocomplete"; # completes history, commands, etc.
src = pkgs.fetchFromGitHub {
owner = "marlonrichert";
repo = "zsh-autocomplete";
rev = "762afacbf227ecd173e899d10a28a478b4c84a3f";
sha256 = "1357hygrjwj5vd4cjdvxzrx967f1d2dbqm2rskbz5z1q6jri1hm3";
}; # e.g., nix-prefetch-url --unpack https://github.com/marlonrichert/zsh-autocomplete/archive/762afacbf227ecd173e899d10a28a478b4c84a3f.tar.gz
}
];
enableCompletion = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -l";
upd = "sudo nixos-rebuild switch --flake /home/biscuit/Nixos/#biscuit";
hupd = "home-manager switch --flake /home/biscuit/Nixos/#biscuit --impure";
};
history.size = 10000;
oh-my-zsh = {
plugins = [ "z" ];
enable = true;
theme = "robbyrussell";
extraConfig = ''
# Required for autocomplete with box: https://unix.stackexchange.com/a/778868
zstyle ':completion:*' completer _expand _complete _ignored _approximate _expand_alias
zstyle ':autocomplete:*' default-context curcontext
zstyle ':autocomplete:*' min-input 0
setopt HIST_FIND_NO_DUPS
autoload -Uz compinit
compinit
setopt autocd # cd without writing 'cd'
setopt globdots # show dotfiles in autocomplete list
'';
};
};
}