-
Notifications
You must be signed in to change notification settings - Fork 0
/
zsh.nix
40 lines (38 loc) · 1.03 KB
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ pkgs, ... }: {
programs.fzf = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --files --hidden --follow";
defaultOptions = [ "-m --bind ctrl-a:select-all,ctrl-d:deselect-all" ];
};
programs.zsh = {
enable = true;
profileExtra = builtins.readFile ./zsh/profile.zsh;
initExtraFirst = builtins.readFile ./zsh/prompt.zsh;
initExtra = builtins.readFile ./zsh/zshrc;
logoutExtra = builtins.readFile ./zsh/logout;
history.ignoreSpace = true;
history.ignoreDups = true;
sessionVariables = {
PROMPT_COMMAND = "echo";
EDITOR = "nvim";
SHELL = "${pkgs.zsh}/bin/zsh";
BAT_THEME = "OneHalfDark";
};
shellAliases = {
rm = "rm -i";
mv = "mv -i";
cp = "cp -i";
grep = "grep --color=auto";
sudo = "sudo ";
nv = "nvim";
cl = "clear";
fe = "find_and_edit"; # see .profile for function definition
};
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}