mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
zsh/prezto: add package
option
Allow setting a custom package for `programs.zsh.prezto`.
This commit is contained in:
parent
3ac39b2a8b
commit
49d1113a98
2 changed files with 8 additions and 6 deletions
|
@ -665,7 +665,7 @@ in
|
|||
|
||||
''
|
||||
${optionalString cfg.prezto.enable
|
||||
(builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")}
|
||||
(builtins.readFile "${cfg.prezto.package}/share/zsh-prezto/runcoms/zshrc")}
|
||||
|
||||
${concatStrings (map (plugin: ''
|
||||
if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then
|
||||
|
|
|
@ -14,6 +14,8 @@ let
|
|||
options = {
|
||||
enable = mkEnableOption "prezto";
|
||||
|
||||
package = mkPackageOption pkgs "prezto" { default = "zsh-prezto"; };
|
||||
|
||||
caseSensitive = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
# See <https://github.com/nix-community/home-manager/issues/2255>.
|
||||
|
@ -379,15 +381,15 @@ in {
|
|||
};
|
||||
config = mkIf cfg.enable (mkMerge [{
|
||||
home.file."${relToDotDir ".zprofile"}".text =
|
||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zprofile";
|
||||
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zprofile";
|
||||
home.file."${relToDotDir ".zlogin"}".text =
|
||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
|
||||
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogin";
|
||||
home.file."${relToDotDir ".zlogout"}".text =
|
||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
|
||||
home.packages = with pkgs; [ zsh-prezto ];
|
||||
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zlogout";
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.file."${relToDotDir ".zshenv"}".text =
|
||||
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshenv";
|
||||
builtins.readFile "${cfg.package}/share/zsh-prezto/runcoms/zshenv";
|
||||
home.file."${relToDotDir ".zpreztorc"}".text = ''
|
||||
# Generated by Nix
|
||||
${optionalString (cfg.caseSensitive != null) ''
|
||||
|
|
Loading…
Reference in a new issue