nixos/home/zsh/default.nix

39 lines
1014 B
Nix
Raw Normal View History

2024-02-27 21:20:00 +00:00
{ user, pkgs, ... }: {
2024-02-27 09:09:03 +00:00
home.packages = with pkgs; [ fd ];
programs.zsh = {
enable = true;
autocd = false;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
2024-02-27 20:59:29 +00:00
shellAliases = {
2024-03-02 20:16:23 +00:00
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos";
2024-04-24 10:36:23 +00:00
ndiffbuild = "sudo nixos-rebuild build --flake /home/${user}/nixos && nvd diff /run/current-system /home/${user}/nixos/result";
2024-02-27 20:59:29 +00:00
};
initExtra = ''
bindkey -v
bindkey '^R' history-incremental-search-backward
2024-03-08 17:14:22 +00:00
# Prompt stuff
autoload -Uz promptinit
promptinit
prompt pure
2024-03-17 22:36:18 +00:00
export PATH="''${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
2024-04-10 08:07:32 +00:00
# Aliases
alias ls=eza
alias find=fd
2024-05-10 21:49:43 +00:00
# Init zoxide
eval "$(zoxide init zsh)"
2024-02-27 20:59:29 +00:00
'';
2024-03-08 17:14:22 +00:00
zplug = {
enable = true;
plugins = [
({ name = "plugins/git"; tags = [ "from:oh-my-zsh" ]; })
({ name = "modules/prompt"; tags = [ "from:prezto" ]; })
];
};
2024-02-27 09:09:03 +00:00
};
}