mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
programs.zsh.ohMyZsh: add package
option to make package overrides on module-base easier
This commit is contained in:
parent
bbafe64bdd
commit
95bf0cc1cb
@ -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