summaryrefslogtreecommitdiff
path: root/zsh/default.nix
blob: 5071c9f96d8fa9d8a7680d9e3c2fa307e66d0ab9 (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
{

  pkgs ? (import ../pkgs.nix) {},

}: rec {

  ohMyZsh = ./oh-my-zsh;

  zshrc = pkgs.writeTextDir ".zshrc" ''

    # oh-my-zsh
    export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh
    ZSH_CUSTOM=${./custom}
    ZSH_THEME=mediocregopher
    DISABLE_AUTO_UPDATE=true
    plugins=(git vi-mode)
    source $ZSH/oh-my-zsh.sh

    PATH=${../bin}:$PATH

    . ${./zshrc}
    . ${./env}
    . ${./aliases}
    . ${pkgs.nix}/etc/profile.d/nix.sh
  '';

  zsh = pkgs.writeScriptBin "zsh" ''
    #!${pkgs.bash}/bin/bash
    ZDOTDIR=${zshrc} exec ${pkgs.zsh}/bin/zsh "$@"
  '';
}