nixos/home/zsh/default.nix
Torjus Håkestad 87ee09343e
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Remove fd alias
2024-07-06 12:10:23 +02:00

47 lines
1.2 KiB
Nix

{ user, pkgs, ... }: {
home.packages = with pkgs; [ fd ];
programs.direnv = {
enable = true;
enableZshIntegration = true;
package = pkgs.direnv;
nix-direnv = {
enable = true;
package = pkgs.nix-direnv;
};
};
programs.zsh = {
enable = true;
autocd = false;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos";
ndiffbuild = "sudo nixos-rebuild build --flake /home/${user}/nixos && nvd diff /run/current-system /home/${user}/nixos/result";
};
initExtra = ''
bindkey -v
bindkey '^R' history-incremental-search-backward
# Prompt stuff
autoload -Uz promptinit
promptinit
prompt pure
export PATH="''${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
# Aliases
alias ls=eza
# Init zoxide
eval "$(zoxide init zsh)"
'';
zplug = {
enable = true;
plugins = [
({ name = "plugins/git"; tags = [ "from:oh-my-zsh" ]; })
({ name = "modules/prompt"; tags = [ "from:prezto" ]; })
];
};
};
}