From fdb9ba23a2cff4b50a699eb89435aa9a9de77891 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Fri, 29 Sep 2023 20:32:40 -0700 Subject: nix: trying modules --- darwin/home.nix | 54 ++++-------------------------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) (limited to 'darwin/home.nix') diff --git a/darwin/home.nix b/darwin/home.nix index e0b1bb0..5e24a76 100644 --- a/darwin/home.nix +++ b/darwin/home.nix @@ -44,6 +44,10 @@ }; }; + imports = [ + ../modules/zsh.nix + ]; + home.sessionVariables = { PATH = "$PATH:$HOME/.bin"; EDITOR = "nvim"; @@ -51,56 +55,6 @@ }; programs.home-manager.enable = true; - programs.zsh = { - enable = true; - enableCompletion = true; - enableAutosuggestions = true; - dotDir = ".zsh"; - history = { - ignoreAllDups = true; - path = "$HOME/.zsh/history"; - }; - initExtra = '' - zstyle ':completion:*' menu select - zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' - zmodload zsh/complist - bindkey -M menuselect 'h' vi-backward-char - bindkey -M menuselect 'k' vi-up-line-or-history - bindkey -M menuselect 'l' vi-forward-char - bindkey -M menuselect 'j' vi-down-line-or-history - bindkey '^f' autosuggest-accept - source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh - zvm_after_init_commands+=('source ${pkgs.fzf}/share/fzf/completion.zsh && source ${pkgs.fzf}/share/fzf/key-bindings.zsh') - ''; - shellAliases = { - ".." = "cd .."; - l = "ls --color -al"; - ls = "ls --color"; - v = "nvim"; - o = "xdg-open"; - t = "tmux"; - f = "lf"; - tf = "terraform"; - k = "kubectl"; - gst = "git status --short"; - ga = "git add"; - gp = "git push"; - gl = "git log --oneline --decorate --graph"; - gc = "git commit -v -S"; - gd = "git diff --minimal"; - }; - plugins = [ - { - name = "pure"; - src = pkgs.fetchFromGitHub { - owner = "sindresorhus"; - repo = "pure"; - rev = "v1.22.0"; - sha256 = "177vabhvgrxdcwvc29rmfmfr96wl75hrkhymnd8qcaky2v4047jd"; - }; - } - ]; - }; programs.fzf = { enable = true; enableZshIntegration = false; -- cgit v1.2.3