aboutsummaryrefslogtreecommitdiffstats
path: root/home/root/common/core/zsh/default.nix
blob: eaec714381bfcb9a00a460e36dba1585b799ded9 (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
{
  programs.zsh = {
    enable = true;
    envExtra = ''
export PATH=~/bin:''${PATH}

#export PS1="%B%n%b@%U%m%u/%l:%~> "
export PAGER=less
export EDITOR=vim

export LC_COLLATE="C"
export QUOTING_STYLE="literal"

#export COLORTERM=truecolor
#export COLORFGBG="green;blue"
export COLORFGBG=";0"
    '';
    history = {
      save = 100000;
      size = 100000;
    };
    initExtra = (builtins.readFile ./zshrc);
    shellAliases = {
      grep = "grep --color=auto";
      ip = "ip -c=auto";
      la = "ls -aF --color=auto";
      ll = "ls -alFhs --color=auto";
      nix-list-derivations = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
      nix-list-generations = "nixos-rebuild list-generations | cat; echo; nix-env --list-generations --profile /nix/var/nix/profiles/system";
      pstrace = "bpftrace -e 'tracepoint:syscalls:sys_enter_exec*{ printf(\"pid: %d, comm: %s, args: \", pid, comm); join(args->argv); }'";
      zgrep = "zgrep --color=auto";
    };
  };
}