mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #27469 from Ma27/oh-my-zsh/make-pkg-configurable
programs.zsh.ohMyZsh: add `package` option to make package overrides on module-base easier
This commit is contained in:
commit
b1bff52a5c
@ -15,6 +15,16 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.oh-my-zsh;
|
||||
defaultText = "pkgs.oh-my-zsh";
|
||||
description = ''
|
||||
Package to install for `oh-my-zsh` usage.
|
||||
'';
|
||||
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = [];
|
||||
type = types.listOf(types.str);
|
||||
@ -46,11 +56,11 @@ in
|
||||
# Prevent zsh from overwriting oh-my-zsh's prompt
|
||||
programs.zsh.promptInit = mkDefault "";
|
||||
|
||||
environment.systemPackages = with pkgs; [ oh-my-zsh ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
programs.zsh.interactiveShellInit = with pkgs; with builtins; ''
|
||||
programs.zsh.interactiveShellInit = with builtins; ''
|
||||
# oh-my-zsh configuration generated by NixOS
|
||||
export ZSH=${oh-my-zsh}/share/oh-my-zsh
|
||||
export ZSH=${cfg.package}/share/oh-my-zsh
|
||||
|
||||
${optionalString (length(cfg.plugins) > 0)
|
||||
"plugins=(${concatStringsSep " " cfg.plugins})"
|
||||
|
Loading…
Reference in New Issue
Block a user