Skip to content

Commit

Permalink
Small correction to pyenv installation and config
Browse files Browse the repository at this point in the history
  • Loading branch information
borland502 committed Dec 28, 2024
1 parent 9410c06 commit 6684e83
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
1 change: 1 addition & 0 deletions .chezmoi.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ data:
home: "{{ $home }}"
name: "{{ $name }}"
email: "{{ $email }}"
sourceDir: "{{ $xdg_data_home }}/automation/home-ops/scripts/dotfiles"
taskfile: [
'ANSIBLE_HOME: "{{$home}}/.ansible"',
'AUTOMATION_HOME: "{{$xdg_data_home}}/automation"',
Expand Down
3 changes: 2 additions & 1 deletion .chezmoidata/env.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ COLORTERM = "truecolor"


[pyenv.cmds]
INIT = 'eval "$($PYENV_BIN init --path)"'
INIT = 'eval "$(pyenv init - --zsh)"'
VIRTUAL_ENV = 'eval "$($PYENV_BIN virtualenv-init -)"'
INSTALL = '$PYENV_BIN install ${PYTHON_VERSION}'
LTS = '$PYENV_BIN install ${PYTHON_VERSION}'
Expand All @@ -55,6 +55,7 @@ PYTHON_CONFIGURE_OPTS = '--enable-optimizations --with-lto'
PYTHON_CFLAGS = '-march=native -mtune=native'
LDFLAGS = '-L$HOMEBREW_PREFIX/opt/zlib/lib'
CPPFLAGS = '-I$$HOMEBREW_PREFIX/opt/zlib/include'
PATH="$PYENV_ROOT/bin:$PATH"
[nvm.cmds]
SOURCE = 'source "${NVM_DIR}/nvm.sh"'
INSTALL = 'nvm install'
Expand Down
7 changes: 7 additions & 0 deletions dot_zprofile.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

eval "$(/opt/homebrew/bin/brew shellenv)"


# Added by Toolbox App
export PATH="$PATH:/Users/jhettenh/Library/Application Support/JetBrains/Toolbox/scripts"

20 changes: 0 additions & 20 deletions dot_zshenv.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,4 @@ set +o allexport
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{{ end }}

# Set Pyenv
set -o allexport
{{- range .pyenv.vars -}}
{{- range $key, $value := . }}
{{ $key }}="{{ $value }}"
{{- end }}
{{- end }}
set +o allexport

{{ .pyenv.cmds.INIT }}

# Set NVM
set -o allexport
{{- range .nvm.vars -}}
{{- range $key, $value := . }}
{{ $key }}="{{ $value }}"
{{- end }}
{{- end }}
set +o allexport

{{ .nvm.cmds.SOURCE }}
20 changes: 20 additions & 0 deletions dot_zshrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,27 @@ ssh-add {{ .chezmoi.homeDir }}/.ssh/id_ed25519
eval "$(starship init zsh)"
{{end}}

# Set Pyenv
set -o allexport
{{- range .pyenv.vars -}}
{{- range $key, $value := . }}
{{ $key }}="{{ $value }}"
{{- end }}
{{- end }}
set +o allexport

{{ .pyenv.cmds.INIT }}

# Set NVM
set -o allexport
{{- range .nvm.vars -}}
{{- range $key, $value := . }}
{{ $key }}="{{ $value }}"
{{- end }}
{{- end }}
set +o allexport

{{ .nvm.cmds.SOURCE }}

autoload -U +X bashcompinit && bashcompinit
autoload -U +X compinit && compinit

0 comments on commit 6684e83

Please sign in to comment.