From 1f9d802bc071d9213f1b39c801c29f9a60c7ddc0 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 9 Mar 2023 21:54:35 -0600 Subject: [PATCH] Simplify zsh --- home.nix | 10 ++++++++- zsh.nix | 67 +++++++------------------------------------------------- 2 files changed, 17 insertions(+), 60 deletions(-) diff --git a/home.nix b/home.nix index 28661a1..2599845 100644 --- a/home.nix +++ b/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; [ diff --git a/zsh.nix b/zsh.nix index 8fece5a..1baca02 100644 --- a/zsh.nix +++ b/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"; - } ]; }; }