summaryrefslogtreecommitdiff
path: root/custom/zsh.nix
blob: 05f4341043c859372732d325f10ed90a744ac138 (plain)
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
{ config, pkgs, ... }:
let
	antigen = pkgs.callPackage (import ./antigen.nix) {};
in rec {
  programs.zsh.enable = true;
  programs.zsh.shellAliases = {
    less = "less -R";
    ls = "ls --color=auto";
    l = "ls -lhAF";
    ll = "l --color=always L";
    ".." = "cd ..";
  };
  programs.zsh.interactiveShellInit = ''
    setopt clobber
    setopt nobeep

    alias -g L='|less'
    alias -g S='&> /dev/null'
    alias -g G='|grep --color=auto'
    alias -g B='&> /dev/null &!'

    cl() { cd; clear }
  '';
	programs.zsh.promptInit = ''
    bindkey -e
    source ${antigen}/antigen.zsh

    antigen use oh-my-zsh
    antigen bundles <<EOBUNDLES
      git
      tmux
      zsh-users/zsh-syntax-highlighting
      systemd
    EOBUNDLES

    antigen theme jreese

    antigen apply
  '';
}