nixos/home/zsh/default.nix
Torjus Håkestad 3dd86be770
All checks were successful
Run nix flake check / flake-check (push) Successful in 1m54s
Periodic flake update / flake-update (push) Successful in 1m15s
Add MANPAGER to zshrc
2024-12-27 06:43:52 +01:00

56 lines
1.3 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.zoxide = {
enable = true;
enableZshIntegration = true;
};
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"
export MANPAGER="nvim +Man!"
# Aliases
alias ls=eza
'';
zplug = {
enable = true;
plugins = [
({
name = "plugins/git";
tags = [ "from:oh-my-zsh" ];
})
({
name = "modules/prompt";
tags = [ "from:prezto" ];
})
];
};
};
}