diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/antigen.nix | 18 | ||||
-rw-r--r-- | custom/zsh.nix | 40 |
2 files changed, 58 insertions, 0 deletions
diff --git a/custom/antigen.nix b/custom/antigen.nix new file mode 100644 index 00000000..07fc41c6 --- /dev/null +++ b/custom/antigen.nix | |||
@@ -0,0 +1,18 @@ | |||
1 | { stdenv | ||
2 | , fetchgit | ||
3 | }: | ||
4 | |||
5 | stdenv.mkDerivation rec { | ||
6 | name="antigen"; | ||
7 | src = fetchgit { | ||
8 | inherit name; | ||
9 | url = https://github.com/zsh-users/antigen.git; | ||
10 | rev = "30098c1d9955b8548aa827588c0d2c9be077c6f2"; | ||
11 | sha256 = "7cb3a75d06fb1e09077703ff0f056f0bfde98b89384afe43ecdc4a42af8e156c"; | ||
12 | }; | ||
13 | builder = builtins.toFile "builder.sh" '' | ||
14 | source $stdenv/setup | ||
15 | |||
16 | cp -r $src $out | ||
17 | ''; | ||
18 | } | ||
diff --git a/custom/zsh.nix b/custom/zsh.nix new file mode 100644 index 00000000..05f43410 --- /dev/null +++ b/custom/zsh.nix | |||
@@ -0,0 +1,40 @@ | |||
1 | { config, pkgs, ... }: | ||
2 | let | ||
3 | antigen = pkgs.callPackage (import ./antigen.nix) {}; | ||
4 | in rec { | ||
5 | programs.zsh.enable = true; | ||
6 | programs.zsh.shellAliases = { | ||
7 | less = "less -R"; | ||
8 | ls = "ls --color=auto"; | ||
9 | l = "ls -lhAF"; | ||
10 | ll = "l --color=always L"; | ||
11 | ".." = "cd .."; | ||
12 | }; | ||
13 | programs.zsh.interactiveShellInit = '' | ||
14 | setopt clobber | ||
15 | setopt nobeep | ||
16 | |||
17 | alias -g L='|less' | ||
18 | alias -g S='&> /dev/null' | ||
19 | alias -g G='|grep --color=auto' | ||
20 | alias -g B='&> /dev/null &!' | ||
21 | |||
22 | cl() { cd; clear } | ||
23 | ''; | ||
24 | programs.zsh.promptInit = '' | ||
25 | bindkey -e | ||
26 | source ${antigen}/antigen.zsh | ||
27 | |||
28 | antigen use oh-my-zsh | ||
29 | antigen bundles <<EOBUNDLES | ||
30 | git | ||
31 | tmux | ||
32 | zsh-users/zsh-syntax-highlighting | ||
33 | systemd | ||
34 | EOBUNDLES | ||
35 | |||
36 | antigen theme jreese | ||
37 | |||
38 | antigen apply | ||
39 | ''; | ||
40 | } | ||