mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
zsh: add package
option to oh-my-zsh
Allow setting a custom package for `programs.zsh.oh-my-zsh`.
This commit is contained in:
parent
5cd5a1b585
commit
6169690ae3
1 changed files with 4 additions and 2 deletions
|
@ -142,6 +142,8 @@ let
|
|||
options = {
|
||||
enable = mkEnableOption "oh-my-zsh";
|
||||
|
||||
package = mkPackageOption pkgs "oh-my-zsh" { };
|
||||
|
||||
plugins = mkOption {
|
||||
default = [];
|
||||
example = [ "git" "sudo" ];
|
||||
|
@ -447,7 +449,7 @@ in
|
|||
|
||||
(mkIf cfg.oh-my-zsh.enable {
|
||||
home.file."${relToDotDir ".zshenv"}".text = ''
|
||||
ZSH="${pkgs.oh-my-zsh}/share/oh-my-zsh";
|
||||
ZSH="${cfg.oh-my-zsh.package}/share/oh-my-zsh";
|
||||
ZSH_CACHE_DIR="${config.xdg.cacheHome}/oh-my-zsh";
|
||||
'';
|
||||
})
|
||||
|
@ -482,7 +484,7 @@ in
|
|||
{
|
||||
home.packages = with pkgs; [ zsh ]
|
||||
++ optional cfg.enableCompletion nix-zsh-completions
|
||||
++ optional cfg.oh-my-zsh.enable oh-my-zsh;
|
||||
++ optional cfg.oh-my-zsh.enable cfg.oh-my-zsh.package;
|
||||
|
||||
home.file."${relToDotDir ".zshrc"}".text = concatStringsSep "\n" ([
|
||||
cfg.initExtraFirst
|
||||
|
|
Loading…
Reference in a new issue