/
zsh.nix
51 lines (42 loc) · 885 Bytes
/
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
41
42
43
44
45
46
47
48
49
50
51
{ pkgs, ... }:
let
extras = [
./zsh/elm.zsh
./zsh/git.zsh
./zsh/jetpack.zsh
./zsh/jump.zsh
./zsh/kill-process.zsh
./zsh/find-and-edit.zsh
./zsh/nix.zsh
./zsh/nixify.sh
./zsh/root.zsh
./zsh/rubofix.zsh
./zsh/scripts.zsh
];
extraInitExtra =
builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) ""
extras;
in {
home.packages = [
# for shell autocorrections
pkgs.thefuck
];
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
enableAutosuggestions = true;
enableCompletion = true;
initExtra = ''
EDITOR=kak
setopt PROMPT_SUBST
PROMPT="%B%F{blue}%c%f%b %F{blue}»%f "
RPROMPT=
eval $(${pkgs.thefuck}/bin/thefuck --alias heck)
'' + extraInitExtra;
history = {
save = 10000;
size = 10000;
share = true;
};
};
}