mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
114 lines
3.2 KiB
Bash
Executable File
114 lines
3.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
# shellcheck enable=external-sources
|
|
# shellcheck disable=1091
|
|
# vim: filetype=zsh
|
|
source "$DOTFILES/scripts/shared.sh"
|
|
|
|
# Antigen configuration
|
|
# https://github.com/zsh-users/antigen/wiki/Configuration
|
|
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
|
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
|
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
|
|
|
# Ansible configuration
|
|
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
|
have ansible && {
|
|
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
|
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
|
|
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
|
|
x-dc "$ANSIBLE_HOME"
|
|
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
|
|
}
|
|
|
|
# composer, https://getcomposer.org/
|
|
have composer && {
|
|
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
|
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
|
export PATH="$COMPOSER_BIN:$PATH"
|
|
}
|
|
|
|
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
|
have docker && {
|
|
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
|
x-dc "$DOCKER_CONFIG"
|
|
# Docker: Disable snyk ad
|
|
export DOCKER_SCAN_SUGGEST=false
|
|
}
|
|
|
|
# ffmpeg
|
|
have ffmpeg && {
|
|
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
|
|
x-dc "$FFMPEG_DATADIR"
|
|
}
|
|
|
|
# gcloud
|
|
have gcloud && {
|
|
GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
|
[[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
|
[[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
|
}
|
|
|
|
# gem, rubygems
|
|
have gem && {
|
|
export GEM_HOME="$XDG_STATE_HOME/gem"
|
|
export GEM_PATH="$XDG_STATE_HOME/gem"
|
|
export PATH="$GEM_HOME/bin:$PATH"
|
|
path_append "$GEM_PATH/bin"
|
|
}
|
|
|
|
# If we have go packages, include them to the PATH
|
|
have go && {
|
|
export GOPATH="$XDG_DATA_HOME/go"
|
|
export GOBIN="$XDG_BIN_HOME"
|
|
x-dc "$GOPATH"
|
|
}
|
|
|
|
# irssi
|
|
have irssi && {
|
|
# These variables are used in ./alias with --config and --home
|
|
export IRSSI_CONFIG_HOME="$XDG_CONFIG_HOME/irssi"
|
|
export IRSSI_CONFIG_FILE="$IRSSI_CONFIG_HOME/config"
|
|
x-dc "$IRSSI_CONFIG_HOME"
|
|
}
|
|
|
|
# nvm, the node version manager
|
|
export NVM_LAZY_LOAD=true
|
|
export NVM_COMPLETION=true
|
|
export NVM_AUTO_USE=true
|
|
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
|
|
# op (1Password cli) is present
|
|
have op && {
|
|
export OP_CACHE="$XDG_STATE_HOME/1password"
|
|
x-dc "$OP_CACHE"
|
|
eval "$(op completion zsh)"
|
|
compdef _op op
|
|
}
|
|
|
|
# pyenv, python environments
|
|
have pyenv && {
|
|
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
|
x-dc "$PYENV_ROOT"
|
|
path_append "$PYENV_ROOT/bin"
|
|
|
|
eval "$(pyenv init -)"
|
|
}
|
|
|
|
# wakatime, https://github.com/wakatime/wakatime-cli
|
|
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
|
x-dc "$WAKATIME_HOME"
|
|
|
|
# z, https://github.com/rupa/z
|
|
export _Z_DATA="$XDG_STATE_HOME/z"
|
|
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
|
|
|
|
# Misc
|
|
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
|
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
|
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
|
export TMUX_CONF="$DOTFILES/config/tmux/tmux.conf"
|
|
export BAT_THEME="ansi"
|