summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-06-07 23:59:15 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-06-07 23:59:15 +0200
commit12399cb846a7b97ba6d8785d90daf033fd0b97ac (patch)
tree92861f39326b29bfe9ba6d6123f870db6e2277bd /custom
parent04c4bbbbc3d0c15cb5d18d5739672b969a533259 (diff)
downloadnixos-12399cb846a7b97ba6d8785d90daf033fd0b97ac.tar
nixos-12399cb846a7b97ba6d8785d90daf033fd0b97ac.tar.gz
nixos-12399cb846a7b97ba6d8785d90daf033fd0b97ac.tar.bz2
nixos-12399cb846a7b97ba6d8785d90daf033fd0b97ac.tar.xz
nixos-12399cb846a7b97ba6d8785d90daf033fd0b97ac.zip
ZSH config
Diffstat (limited to 'custom')
-rw-r--r--custom/antigen.nix18
-rw-r--r--custom/zsh.nix40
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
5stdenv.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, ... }:
2let
3 antigen = pkgs.callPackage (import ./antigen.nix) {};
4in 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}