mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 15:14:26 +00: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 = {
|
||||
enable = mkEnableOption "Z shell (Zsh)";
|
||||
|
||||
package = mkPackageOption pkgs "zsh" { };
|
||||
|
||||
autocd = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
|
@ -482,8 +484,8 @@ in
|
|||
}
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ zsh ]
|
||||
++ optional cfg.enableCompletion nix-zsh-completions
|
||||
home.packages = [ cfg.package ]
|
||||
++ optional cfg.enableCompletion pkgs.nix-zsh-completions
|
||||
++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package;
|
||||
|
||||
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)
|
||||
done
|
||||
|
||||
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
|
||||
HELPDIR="${cfg.package}/share/zsh/$ZSH_VERSION/help"
|
||||
''
|
||||
|
||||
(optionalString (cfg.defaultKeymap != null) ''
|
||||
|
|
Loading…
Reference in a new issue