summaryrefslogtreecommitdiff
path: root/darwin
diff options
context:
space:
mode:
authorShubham Saini <ssaini@fispan.com>2023-09-30 03:32:40 +0000
committerShubham Saini <ssaini@fispan.com>2023-09-30 03:32:40 +0000
commitfdb9ba23a2cff4b50a699eb89435aa9a9de77891 (patch)
tree025d7259ddaee08b1d11678ce6f2ba729c10b8cc /darwin
parent88a10686f7cd9e15feb8d3464c20749dbd51f7c4 (diff)
nix: trying modules
Diffstat (limited to 'darwin')
-rw-r--r--darwin/home.nix54
1 files changed, 4 insertions, 50 deletions
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 @@
44 }; 44 };
45 }; 45 };
46 46
47 imports = [
48 ../modules/zsh.nix
49 ];
50
47 home.sessionVariables = { 51 home.sessionVariables = {
48 PATH = "$PATH:$HOME/.bin"; 52 PATH = "$PATH:$HOME/.bin";
49 EDITOR = "nvim"; 53 EDITOR = "nvim";
@@ -51,56 +55,6 @@
51 }; 55 };
52 56
53 programs.home-manager.enable = true; 57 programs.home-manager.enable = true;
54 programs.zsh = {
55 enable = true;
56 enableCompletion = true;
57 enableAutosuggestions = true;
58 dotDir = ".zsh";
59 history = {
60 ignoreAllDups = true;
61 path = "$HOME/.zsh/history";
62 };
63 initExtra = ''
64 zstyle ':completion:*' menu select
65 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:|=*'
66 zmodload zsh/complist
67 bindkey -M menuselect 'h' vi-backward-char
68 bindkey -M menuselect 'k' vi-up-line-or-history
69 bindkey -M menuselect 'l' vi-forward-char
70 bindkey -M menuselect 'j' vi-down-line-or-history
71 bindkey '^f' autosuggest-accept
72 source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
73 zvm_after_init_commands+=('source ${pkgs.fzf}/share/fzf/completion.zsh && source ${pkgs.fzf}/share/fzf/key-bindings.zsh')
74 '';
75 shellAliases = {
76 ".." = "cd ..";
77 l = "ls --color -al";
78 ls = "ls --color";
79 v = "nvim";
80 o = "xdg-open";
81 t = "tmux";
82 f = "lf";
83 tf = "terraform";
84 k = "kubectl";
85 gst = "git status --short";
86 ga = "git add";
87 gp = "git push";
88 gl = "git log --oneline --decorate --graph";
89 gc = "git commit -v -S";
90 gd = "git diff --minimal";
91 };
92 plugins = [
93 {
94 name = "pure";
95 src = pkgs.fetchFromGitHub {
96 owner = "sindresorhus";
97 repo = "pure";
98 rev = "v1.22.0";
99 sha256 = "177vabhvgrxdcwvc29rmfmfr96wl75hrkhymnd8qcaky2v4047jd";
100 };
101 }
102 ];
103 };
104 programs.fzf = { 58 programs.fzf = {
105 enable = true; 59 enable = true;
106 enableZshIntegration = false; 60 enableZshIntegration = false;