loadout/zsh/default.nix
mediocregopher 247127647b Fix Browser
2024-01-06 13:13:48 +01:00

32 lines
662 B
Nix

{
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
. ${pkgs.nix}/etc/profile.d/nix.sh
# 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 BROWSER=${config.browser}
. ${./zshrc}
. ${./aliases}
'';
zsh = pkgs.writeScriptBin "zsh" ''
#!${pkgs.bash}/bin/bash
ZDOTDIR=${zshrc} exec ${pkgs.zsh}/bin/zsh "$@"
'';
}