Skip to content

Commit

Permalink
Remove conda and ignore stuff for compinit if on non-NixOS system
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Dec 16, 2024
1 parent 4eb936e commit 2039fc8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions modules/home-manager/server/shell/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
pkgs,
lib,
...
}:
}@args:
{
options.zsh.enable = lib.mkEnableOption "Configure zsh for you";

Expand Down Expand Up @@ -37,6 +37,8 @@
};
autosuggestion.enable = true;
enableCompletion = true;
completionInit =
"autoload -U compinit && compinit" + lib.optionalString (!(args ? nixosConfig)) " -u";
historySubstringSearch = {
enable = true;
searchDownKey = [ "^[OB" ];
Expand All @@ -60,7 +62,7 @@
unsetopt BEEP
# Enable autocomplete for . and ..
autoload -Uz compinit && compinit
#autoload -Uz compinit && compinit
zstyle ':completion:*' special-dirs true
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "''${(s.:.)LS_COLORS}"
Expand All @@ -87,18 +89,18 @@
# source ~/.config/zsh/_bws
# >>> conda initialize >>>
__conda_setup="$('/opt/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then
. "/opt/conda/etc/profile.d/conda.sh"
else
export PATH="/opt/conda/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# __conda_setup="$('/opt/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
# if [ $? -eq 0 ]; then
# eval "$__conda_setup"
# else
# if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then
# . "/opt/conda/etc/profile.d/conda.sh"
# else
# export PATH="/opt/conda/bin:$PATH"
# fi
# fi
# unset __conda_setup
# # <<< conda initialize <<<
'';

# antidote = {
Expand Down

0 comments on commit 2039fc8

Please sign in to comment.