{ pkgs ? (import ../pkgs.nix).stable {}, config, }: rec { zshrc = pkgs.writeTextDir ".zshrc" '' # Import before anything else, so that we have the full PATH available for # everything following. We prefer a global install (via the system's actual # package manager) to using nix in the nix profile. if [ -f /etc/profile.d/nix-daemon.sh ]; then . /etc/profile.d/nix-daemon.sh elif [ -f "$HOME"/.nix-profile/etc/profile.d/nix-daemon.sh ]; then . "$HOME"/.nix-profile/etc/profile.d/nix-daemon.sh fi # 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 export TERMINFO_DIRS=${pkgs.ncurses}/lib/terminfo:${./terminfo} export BROWSER=${config.browser} . ${./zshrc} . ${./aliases} ''; zsh = pkgs.writeScriptBin "zsh" '' #!${pkgs.bash}/bin/bash ZDOTDIR=${zshrc} exec ${pkgs.zsh}/bin/zsh "$@" ''; }