1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

zsh: add package option (#3945)

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2023-05-11 01:54:34 +02:00 committed by GitHub
parent 983f8a1bb9
commit 010c269877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) ''