1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 08:28:30 +02:00
* zsh: update prezto path structure

The path structure was changed in Nixpkgs and this commit updates
the module to match.

Fixes #1773

* zsh-prezto: fix tests, small tidyup

Co-authored-by: Nick Hu <me@nickhu.co.uk>
This commit is contained in:
Pablo Ovelleiro Corral 2021-02-09 03:11:56 +01:00 committed by GitHub
parent 88e05a5472
commit b220d5c446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -452,7 +452,7 @@ in
'') cfg.plugins)}
# Oh-My-Zsh/Prezto calls compinit during initialization,
# calling it twice causes sight start up slowdown
# calling it twice causes slight start up slowdown
# as all $fpath entries will be traversed again.
${optionalString (cfg.enableCompletion && !cfg.oh-my-zsh.enable && !cfg.prezto.enable)
"autoload -U compinit && compinit"
@ -483,7 +483,7 @@ in
''}
${optionalString cfg.prezto.enable
(builtins.readFile "${pkgs.zsh-prezto}/runcoms/zshrc")}
(builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshrc")}
${concatStrings (map (plugin: ''
if [ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]; then

View File

@ -351,16 +351,16 @@ in {
};
};
config = mkIf cfg.enable (mkMerge [{
home.file."${relToDotDir ".zprofile"}".text =
builtins.readFile "${pkgs.zsh-prezto}/runcoms/zprofile";
home.file."${relToDotDir ".zlogin"}".text =
builtins.readFile "${pkgs.zsh-prezto}/runcoms/zlogin";
home.file."${relToDotDir ".zlogout"}".text =
builtins.readFile "${pkgs.zsh-prezto}/runcoms/zlogout";
home.file."${relToDotDir ".zprofile"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zprofile";
home.file."${relToDotDir ".zlogin"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
home.file."${relToDotDir ".zlogout"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
home.packages = with pkgs; [ zsh-prezto ];
home.file."${relToDotDir ".zshenv"}".text =
(builtins.readFile "${pkgs.zsh-prezto}/runcoms/zshenv");
home.file."${relToDotDir ".zshenv"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshenv";
home.file."${relToDotDir ".zpreztorc"}".text = ''
# Generated by Nix
${optionalString (cfg.caseSensitive != null) ''

View File

@ -9,11 +9,11 @@ with lib;
nixpkgs.overlays = [
(self: super: {
zsh-prezto = super.runCommandLocal "dummy-zsh-prezto" { } ''
mkdir -p $out/runcoms
echo '# zprofile' > $out/runcoms/zprofile
echo '# zlogin' > $out/runcoms/zlogin
echo '# zlogout' > $out/runcoms/zlogout
echo '# zshenv' > $out/runcoms/zshenv
mkdir -p $out/share/zsh-prezto/runcoms
echo '# zprofile' > $out/share/zsh-prezto/runcoms/zprofile
echo '# zlogin' > $out/share/zsh-prezto/runcoms/zlogin
echo '# zlogout' > $out/share/zsh-prezto/runcoms/zlogout
echo '# zshenv' > $out/share/zsh-prezto/runcoms/zshenv
'';
})
];