2017-10-18 00:12:57 +00:00
|
|
|
{
|
|
|
|
|
2023-08-13 19:34:14 +00:00
|
|
|
pkgs ? (import ../pkgs.nix).stable {},
|
2024-01-06 11:27:30 +00:00
|
|
|
config,
|
2017-10-18 00:12:57 +00:00
|
|
|
|
|
|
|
}: rec {
|
|
|
|
|
|
|
|
zshrc = pkgs.writeTextDir ".zshrc" ''
|
2024-01-06 10:59:31 +00:00
|
|
|
# Import before anything else, so that we have the full PATH available for
|
|
|
|
# everything following
|
2023-12-16 14:51:15 +00:00
|
|
|
. ${pkgs.nix}/etc/profile.d/nix.sh
|
2017-10-18 00:12:57 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2024-01-06 12:13:48 +00:00
|
|
|
export BROWSER=${config.browser}
|
2024-01-06 11:27:30 +00:00
|
|
|
|
2017-10-18 00:12:57 +00:00
|
|
|
. ${./zshrc}
|
|
|
|
. ${./aliases}
|
|
|
|
'';
|
|
|
|
|
|
|
|
zsh = pkgs.writeScriptBin "zsh" ''
|
|
|
|
#!${pkgs.bash}/bin/bash
|
|
|
|
ZDOTDIR=${zshrc} exec ${pkgs.zsh}/bin/zsh "$@"
|
|
|
|
'';
|
|
|
|
}
|