mirror of
https://github.com/shokinn/.files.git
synced 2025-06-27 23:30:43 +00:00
add meta and os profiles; add distro and vw variable
This commit is contained in:
parent
e1d6ae2686
commit
14f0cc458a
6 changed files with 63 additions and 188 deletions
|
@ -124,7 +124,7 @@ EOF
|
|||
fi
|
||||
}
|
||||
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'susanoo.local' @@%}
|
||||
{%@@ if distro == 'macos' @@%}
|
||||
#######################################
|
||||
# Shows a netstat -tulpn styled output on mac.
|
||||
# Globals:
|
||||
|
@ -351,7 +351,7 @@ dotdrop() {
|
|||
{{@@ env['HOME'] @@}}/.local/bin/dotdrop --cfg={{@@ env['HOME'] @@}}/.files/config.yaml ${@}
|
||||
}
|
||||
|
||||
{%@@ endif @@%}{%@@ if profile == 'WVDEWOBMC001307' @@%}
|
||||
{%@@ endif @@%}{%@@ if vw == true @@%}
|
||||
setProxyEnv() {
|
||||
local HIGHLIGHT='\033[36;1m'
|
||||
local RESET='\033[0;0m'
|
||||
|
|
|
@ -7,7 +7,7 @@ Include {{@@ env['HOME'] @@}}/.colima/ssh_config
|
|||
Include config.d/*.config
|
||||
Include config.d/*/*.config
|
||||
|
||||
{%@@ if profile == 'susanoo.local' or profile == 'WVDEWOBMC001307' @@%}#
|
||||
{%@@ if distro == 'macos' @@%}#
|
||||
# This have to be LAST
|
||||
#
|
||||
Match host * exec "[[ -z $SSH_CLIENT && -z $SSH_TTY ]]"
|
||||
|
|
|
@ -9,26 +9,26 @@ export VISUAL
|
|||
EDITOR='vim'
|
||||
export EDITOR
|
||||
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'susanoo.local' @@%}
|
||||
{%@@ if distro == 'macos' @@%}
|
||||
[[ $(command -v /opt/homebrew/bin/brew) ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
|
||||
# Added by Toolbox App
|
||||
export PATH="$PATH:{{@@ env['HOME'] @@}}/Library/Application Support/JetBrains/Toolbox/scripts"
|
||||
{%@@ endif @@%}
|
||||
|
||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' @@%}
|
||||
{%@@ if linux == true @@%}
|
||||
# Set DOTNET_ROOT enviroment variable
|
||||
DOTNET_ROOT=/opt/dotnet
|
||||
export DOTNET_ROOT
|
||||
|
||||
{%@@ endif @@%}
|
||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' or profile == 'ymir' @@%}
|
||||
{%@@ if linux == true @@%}
|
||||
# Set XDG_CONFIG_HOME
|
||||
XDG_CONFIG_HOME="{{@@ env['HOME'] @@}}/.config"
|
||||
export XDG_CONFIG_HOME
|
||||
|
||||
{%@@ endif @@%}
|
||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' or profile == 'ymir' @@%}
|
||||
{%@@ if wsl == true @@%}
|
||||
# Run VPN-Kit alpine VM to route traffic through Windows and if connected through VPNs
|
||||
wsl.exe -d wsl-vpnkit service wsl-vpnkit start
|
||||
{%@@ endif @@%}
|
||||
|
|
|
@ -11,13 +11,13 @@ export ANSIBLE_NOCOWS=1
|
|||
# Include ~/.local/bin to PATH
|
||||
[[ -d "{{@@ env['HOME'] @@}}/.local/bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.local/bin:${PATH}"
|
||||
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'susanoo.local' @@%}# Include /opt/homebrew/opt/gnu-getopt/bin to PATH
|
||||
{%@@ if distro == 'macos' @@%}# Include /opt/homebrew/opt/gnu-getopt/bin to PATH
|
||||
[[ -d "/opt/homebrew/opt/gnu-getopt/bin" ]] && export PATH="/opt/homebrew/opt/gnu-getopt/bin:${PATH}"
|
||||
|
||||
{%@@ endif @@%}# Include $(go env GOPATH) to PATH
|
||||
[[ $(command -v go) ]] && [[ -d "$(go env GOPATH)/bin" ]] && export PATH="$(go env GOPATH)/bin:${PATH}"
|
||||
|
||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' or profile == 'ymir' @@%}
|
||||
{%@@ if wsl == true @@%}
|
||||
# Connect to windows ssh pageant
|
||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
|
||||
export SSH_AUTH_SOCK={{@@ env['HOME'] @@}}/.ssh/agent.sock
|
||||
|
@ -43,7 +43,7 @@ export GPG_TTY=$(tty)
|
|||
# X410 (Windows X11 Server)
|
||||
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
|
||||
{%@@ endif @@%}
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'susanoo.local' @@%}
|
||||
{%@@ if distro == 'macos' @@%}
|
||||
export HOMEBREW_CASK_OPTS="--appdir=~/Applications"
|
||||
|
||||
{%@@ endif @@%}
|
||||
|
|
|
@ -105,11 +105,11 @@ plugins=(
|
|||
vscode
|
||||
zsh-navigation-tools
|
||||
zsh-ssh
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'ymir' or profile == 'susanoo.local' @@%} # Mac specifics
|
||||
{%@@ if distro == 'macos' @@%} # Mac specifics
|
||||
brew
|
||||
iterm2
|
||||
macos
|
||||
{%@@ endif @@%}{%@@ if profile == 'yoetunheimr' or profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'ymir' @@%} # Archlinux specifics
|
||||
{%@@ endif @@%}{%@@ if distro == 'arch' @@%} # Archlinux specifics
|
||||
archlinux
|
||||
{%@@ endif @@%}
|
||||
)
|
||||
|
@ -157,7 +157,7 @@ source ${ZSH}/oh-my-zsh.sh
|
|||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
# [[ -f {{@@ env['HOME'] @@}}/.files/dotdrop.sh ]] && alias dotdrop='eval $(grep -v "^#" {{@@ env['HOME'] @@}}/.files/.env.public) {{@@ env['HOME'] @@}}/.files/dotdrop.sh' # Not required anymore since I now use
|
||||
[[ $(command -v thefuck) ]] && eval $(thefuck --alias)
|
||||
#{%@@ if profile == 'AINCRAD-wsl' or profile == 'YOETUNHEIMR-wsl' or profile == 'ymir' @@%}
|
||||
#{%@@ if linux == true @@%}
|
||||
# Use https://github.com/jgaa/shinysocks as simple socks5 proxy for windows
|
||||
#[[ $(command -v kubectl) ]] && alias proxy_kubectl="http_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 https_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 kubectl"
|
||||
#[[ $(command -v kubectl) ]] && alias pk='proxy_kubectl'
|
||||
|
@ -173,7 +173,7 @@ alias ssh-strongbox-keys="SSH_AUTH_SOCK=~/Library/Group\ Containers/group.strong
|
|||
# Include $(go env GOPATH) to PATH
|
||||
[[ $(command -v go) ]] && [[ -d "$(go env GOPATH)/bin" ]] && export PATH="$(go env GOPATH)/bin:${PATH}"
|
||||
|
||||
{%@@ if profile == 'WVDEWOBMC001307' or profile == 'susanoo.local' @@%}
|
||||
{%@@ if distro == 'macos' @@%}
|
||||
# Decide which homebrew installation (x64_86 / arm64) should be used
|
||||
if [ "$(sysctl -n sysctl.proc_translated)" = "1" ]; then
|
||||
local brew_path="/usr/local/homebrew/bin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue