From a6cd75f1c384f63267ab9ef2cc96f22e426050cf Mon Sep 17 00:00:00 2001 From: kossLAN Date: Fri, 25 Apr 2025 21:22:22 -0400 Subject: [PATCH 1/2] nix/wrapZsh: remove ability for extraPackages --- nix/config.nix | 6 +----- nix/wrapZsh.nix | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/nix/config.nix b/nix/config.nix index 6cf1fe2..35207a3 100644 --- a/nix/config.nix +++ b/nix/config.nix @@ -15,10 +15,6 @@ in { # Whether or not to enable auto suggestions autoSuggestions = true; - extraPackages = with pkgs; [ - fzf - ]; - # Additional .zshrc configuration that you can add that will be appended to the .zshrc extraZshrc = '' # Stupid thing broken in NixOS module I think @@ -30,7 +26,7 @@ in { bindkey "^[[1;5D" backward-word # Special plugin cases - source <(fzf --zsh) + source <(${lib.getExe pkgs.fzf} --zsh) ''; # A list of path's to a plugin diff --git a/nix/wrapZsh.nix b/nix/wrapZsh.nix index beebdc5..d35b437 100644 --- a/nix/wrapZsh.nix +++ b/nix/wrapZsh.nix @@ -58,7 +58,6 @@ in ''} $out/etc/zsh/.zshrc wrapProgram $out/bin/zsh \ - --prefix PATH : "${lib.makeBinPath conf.extraPackages}" \ --set ZDOTDIR "$out/etc/zsh" ''; } From 0c721ba4be1ed55fb37d1d0435ddd33f7ba05287 Mon Sep 17 00:00:00 2001 From: kossLAN Date: Fri, 25 Apr 2025 21:32:35 -0400 Subject: [PATCH 2/2] nix/wrapZsh: add a better way to add additional packages --- nix/config.nix | 6 +++++- nix/wrapZsh.nix | 13 +++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/nix/config.nix b/nix/config.nix index 35207a3..6cf1fe2 100644 --- a/nix/config.nix +++ b/nix/config.nix @@ -15,6 +15,10 @@ in { # Whether or not to enable auto suggestions autoSuggestions = true; + extraPackages = with pkgs; [ + fzf + ]; + # Additional .zshrc configuration that you can add that will be appended to the .zshrc extraZshrc = '' # Stupid thing broken in NixOS module I think @@ -26,7 +30,7 @@ in { bindkey "^[[1;5D" backward-word # Special plugin cases - source <(${lib.getExe pkgs.fzf} --zsh) + source <(fzf --zsh) ''; # A list of path's to a plugin diff --git a/nix/wrapZsh.nix b/nix/wrapZsh.nix index d35b437..52ab441 100644 --- a/nix/wrapZsh.nix +++ b/nix/wrapZsh.nix @@ -10,12 +10,11 @@ in paths = [pkgs.zsh]; buildInputs = [pkgs.makeWrapper]; postBuild = '' - # When it comes to zsh options, I'm probably missing some important ones, - # if you know of any that I should add please make an issue for me, thank you. - # The sh comment before the multiline is for syntax highlighting in neovim. - mkdir -p $out/etc/zsh - cp ${pkgs.writeText "zshrc" #sh - + # When it comes to zsh options, I'm probably missing some important ones, + # if you know of any that I should add please make an issue for me, thank you. + # The sh comment before the multiline is for syntax highlighting in neovim. + mkdir -p $out/etc/zsh + cp ${pkgs.writeText "zshrc" '' # Auto suggestions ${ @@ -31,6 +30,8 @@ in HISTFILE="$HOME/.zsh_history" HISTSIZE=10000 SAVEHIST=10000 + PATH=${lib.makeBinPath conf.extraPackages}:$PATH + setopt AUTO_CD setopt AUTO_PUSHD setopt PUSHD_IGNORE_DUPS