Simplify zsh
This commit is contained in:
parent
9127e0ff35
commit
1f9d802bc0
2 changed files with 17 additions and 60 deletions
10
home.nix
10
home.nix
|
@ -23,13 +23,14 @@ in
|
|||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ack
|
||||
bat
|
||||
bottom
|
||||
dig
|
||||
exa
|
||||
file
|
||||
htop
|
||||
neofetch
|
||||
starship
|
||||
topgrade
|
||||
|
||||
carla
|
||||
|
@ -58,6 +59,13 @@ in
|
|||
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.starship.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
|
|
67
zsh.nix
67
zsh.nix
|
@ -5,34 +5,23 @@
|
|||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
autocd = true;
|
||||
defaultKeymap = "viins";
|
||||
shellAliases = {
|
||||
cat = "bat";
|
||||
l = "exa -l";
|
||||
la = "exa -la";
|
||||
ls = "exa";
|
||||
v = "lvim";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
source "${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh"
|
||||
source "${pkgs.zsh-z}/share/zsh-z/zsh-z.plugin.zsh"
|
||||
|
||||
export EDITOR=vi
|
||||
|
||||
if [ "$IN_NIX_SHELL" = "impure" ]; then
|
||||
alias b='cargo build'
|
||||
alias c='cargo check'
|
||||
alias r='cargo run'
|
||||
alias t='cargo test'
|
||||
alias v=lvim
|
||||
alias vi=lvim
|
||||
alias vim=lvim
|
||||
else
|
||||
alias v=nvim
|
||||
alias vi=nvim
|
||||
alias vim=nvim
|
||||
alias dev="nix-shell $HOME/Development/default.nix"
|
||||
fi
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
PATH=$PATH:$HOME/.local/bin
|
||||
'';
|
||||
|
||||
plugins = with pkgs; [
|
||||
|
@ -46,46 +35,6 @@
|
|||
};
|
||||
file = "base16-shell.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "0.34.0";
|
||||
sha256 = "qSobM4PRXjfsvoXY6ENqJGI9NEAaFFzlij6MPeTfT0o=";
|
||||
};
|
||||
file = "zsh-completions.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
src = fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.5.0";
|
||||
sha256 = "IT3wpfw8zhiNQsrw59lbSWYh0NQ1CUdUtFzRzHlURH0=";
|
||||
};
|
||||
file = "nix-shell.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.1";
|
||||
sha256 = "gOG0NLlaJfotJfs+SUhGgLTNOnGLjoqnUp54V9aFJg8=";
|
||||
};
|
||||
file = "zsh-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-z";
|
||||
src = fetchFromGitHub {
|
||||
owner = "agkozak";
|
||||
repo = "zsh-z";
|
||||
rev = "aaafebcd97424c570ee247e2aeb3da30444299cd";
|
||||
sha256 = "9Wr4uZLk2CvINJilg4o72x0NEAl043lP30D3YnHk+ZA=";
|
||||
};
|
||||
file = "zsh-z.plugin.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue