mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
zsh: add package
option (#3945)
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
983f8a1bb9
commit
010c269877
1 changed files with 5 additions and 3 deletions
|
@ -215,6 +215,8 @@ in
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = mkEnableOption "Z shell (Zsh)";
|
enable = mkEnableOption "Z shell (Zsh)";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "zsh" { };
|
||||||
|
|
||||||
autocd = mkOption {
|
autocd = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -482,8 +484,8 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [ zsh ]
|
home.packages = [ cfg.package ]
|
||||||
++ optional cfg.enableCompletion nix-zsh-completions
|
++ optional cfg.enableCompletion pkgs.nix-zsh-completions
|
||||||
++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package;
|
++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package;
|
||||||
|
|
||||||
home.file."${relToDotDir ".zshrc"}".text = concatStringsSep "\n" ([
|
home.file."${relToDotDir ".zshrc"}".text = concatStringsSep "\n" ([
|
||||||
|
@ -499,7 +501,7 @@ in
|
||||||
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
||||||
done
|
done
|
||||||
|
|
||||||
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
|
HELPDIR="${cfg.package}/share/zsh/$ZSH_VERSION/help"
|
||||||
''
|
''
|
||||||
|
|
||||||
(optionalString (cfg.defaultKeymap != null) ''
|
(optionalString (cfg.defaultKeymap != null) ''
|
||||||
|
|
Loading…
Reference in a new issue