< Back

zshSource file

Options

aliases#

Aliases to be defined in the wrapped package's .zshrc file. Aliases can either be a string defining the command to be aliased, or a struct where you can define the command and if the alias should be global.

See the documentation for valid options.

Type
attrsOf<either<string, struct<global alias>>>
Example
{
  G = {
    command = "| grep";
    global = true;
  };
  ls = "ls --color";
}

extraPackages#

Runtime dependencies to be injected into the wrapped package's path.

Type
listOf<derivation>

extraZshrc#

zsh script to be injected after the zshrcFiles option in the wrapped package's .zshrc.

Type
string
Example
# zoxide must be added at the end of the .zshrc so we use extraZshrc.
# https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#installation
eval "$(zoxide init zsh)"

extraZshrcFiles#

zsh files to be sourced at the end of the wrapped package's .zshrc file.

Type
listOf<pathLike>

package#

The zsh package to be wrapped.

Type
derivation

plugins#

Plugins to be appended to the wrapped package's .zshrc.

If a value is a derivation, it will be sourced as <derivation>/share/<derivation.pname>/<derivation.pname>.zsh which should be compatible with the majority of plugins. If this path is incorrect then the value may be defined as an attrSet containing the attrs package and path and will be sourced as <package>/<path>.

Type
listOf<either<derivation, struct<plugin>>>
Example
[
  pkgs.zsh-autosuggestions
  {
    package = pkgs.nix-zsh-completions;
    path = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
  }
];

settings#

Options to be enabled or disabled in the wrapped package's .zshrc file.

See the documentation for valid options.

Type
attrsOf<bool>
Example
{
  appendhistory = true;
  autocd = false;
  beep = false;
  sharehistory = true;
}

variables#

Environment variables to be defined in the wrapped package's .zshrc file.

Type
attrs
Example
{
  HISTFILE = "~/.histfile";
  HISTSIZE = 5000;
}

zshrc#

zsh script to be injected into the wrapped package's .zshrc.

Type
string
Example
# Enable vim mode
bindkey -v

# Enable completions. A custom zcompdump location must be used as the
# default location will be $ZDOTDIR which is immutable.
autoload -Uz compinit
compinit -d ~/.cache/zsh/.zcompdump -C

zshrcFiles#

zsh files to be sourced after the zshrc option in the wrapped package's .zshrc file.

Type
listOf<pathLike>