From 21414d5f43ef292eb757e0a325439847db48e3ad Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 22 Nov 2022 01:06:51 +0000 Subject: [PATCH] Update dotfiles/.local/share/chezmoi/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/.chezmoi.toml.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl, dotfiles/.local/share/chezmoi/.chezmoiignore, dotfiles/.config/chezmoi/chezmoi.toml, dotfiles/.local/share/chezmoi/dot_gitconfig.tmpl, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.profile, dotfiles/.local/share/chezmoi/.chezmoitemplates/profile.sh, dotfiles/.vimrc, dotfiles/.local/share/chezmoi/.chezmoitemplates/chassis-info, dotfiles/.local/share/chezmoi/.chezmoitemplates/cpu-info, dotfiles/.local/share/chezmoi/run_once_before_install-software.sh.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml Deleted dotfiles/.config/chezmoi/chezmoi.yaml --- dotfiles/.config/chezmoi/chezmoi.toml | 8 + dotfiles/.config/chezmoi/chezmoi.yaml | 4 - .../.local/share/chezmoi/.chezmoi.toml.tmpl | 19 ++ .../.local/share/chezmoi/.chezmoidata.yaml | 77 +++++ .../share/chezmoi/.chezmoiexternal.toml | 58 ++++ dotfiles/.local/share/chezmoi/.chezmoiignore | 0 .../chezmoi/.chezmoitemplates/chassis-info | 12 + .../share/chezmoi/.chezmoitemplates/cpu-info | 12 + .../chezmoi/.chezmoitemplates/profile.sh | 315 ++++++++++++++++++ dotfiles/.local/share/chezmoi/dot_bashrc.tmpl | 0 .../.local/share/chezmoi/dot_gitconfig.tmpl | 2 + .../.local/share/chezmoi/dot_profile.tmpl | 1 + .../chezmoi/dot_ssh/authorized_keys.tmpl | 3 + .../run_once_before_install-software.sh.tmpl | 8 + dotfiles/.profile | 2 +- dotfiles/.vimrc | 3 + 16 files changed, 519 insertions(+), 5 deletions(-) create mode 100644 dotfiles/.config/chezmoi/chezmoi.toml delete mode 100644 dotfiles/.config/chezmoi/chezmoi.yaml create mode 100644 dotfiles/.local/share/chezmoi/.chezmoi.toml.tmpl create mode 100644 dotfiles/.local/share/chezmoi/.chezmoidata.yaml create mode 100644 dotfiles/.local/share/chezmoi/.chezmoiexternal.toml create mode 100644 dotfiles/.local/share/chezmoi/.chezmoiignore create mode 100644 dotfiles/.local/share/chezmoi/.chezmoitemplates/chassis-info create mode 100644 dotfiles/.local/share/chezmoi/.chezmoitemplates/cpu-info create mode 100644 dotfiles/.local/share/chezmoi/.chezmoitemplates/profile.sh create mode 100644 dotfiles/.local/share/chezmoi/dot_bashrc.tmpl create mode 100644 dotfiles/.local/share/chezmoi/dot_gitconfig.tmpl create mode 100644 dotfiles/.local/share/chezmoi/dot_profile.tmpl create mode 100644 dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl create mode 100644 dotfiles/.local/share/chezmoi/run_once_before_install-software.sh.tmpl diff --git a/dotfiles/.config/chezmoi/chezmoi.toml b/dotfiles/.config/chezmoi/chezmoi.toml new file mode 100644 index 00000000..c1ce2562 --- /dev/null +++ b/dotfiles/.config/chezmoi/chezmoi.toml @@ -0,0 +1,8 @@ +[diff] + pager = "delta" +[git] + autoPush = true +[[textconv]] + pattern = "**/*.plist" + command = "plutil" + args = ["-convert", "xml1", "-o", "-", "-"] diff --git a/dotfiles/.config/chezmoi/chezmoi.yaml b/dotfiles/.config/chezmoi/chezmoi.yaml deleted file mode 100644 index 40fad6b0..00000000 --- a/dotfiles/.config/chezmoi/chezmoi.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourceDir: ~/.local/dotfiles -git: - autoPush: true \ No newline at end of file diff --git a/dotfiles/.local/share/chezmoi/.chezmoi.toml.tmpl b/dotfiles/.local/share/chezmoi/.chezmoi.toml.tmpl new file mode 100644 index 00000000..50d084a5 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoi.toml.tmpl @@ -0,0 +1,19 @@ +{{- $codespaces:= env "CODESPACES" | not | not -}} +{{- $email := promptStringOnce . "email" "Email address" -}} +{{- $name := promptStringOnce . "name" "Full name" -}} +sourceDir = {{ .chezmoi.sourceDir | quote }} + +[data] + codespaces = {{ $codespaces }} + headless = {{ $headless }} +{{- if $codespaces }} + email = "help@megabyte.space" + name = "Megabyte Labs" +{{- else }} + email = {{ $email | quote }} + name = {{ $name | quote }} +{{- end }} + +[git] + autoCommit = true + autoPush = true diff --git a/dotfiles/.local/share/chezmoi/.chezmoidata.yaml b/dotfiles/.local/share/chezmoi/.chezmoidata.yaml new file mode 100644 index 00000000..9eb940d8 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoidata.yaml @@ -0,0 +1,77 @@ +--- +preference: + - flatpak + - snap + - whalebrew + - apt + - dnf + - pacman + - apk + - brew + - yay + - choco + - scoop + - winget + - cask + - go + - cargo + - binary + +alternatives: + delta: + brew: + - git-delta + - example-dependency + scoop: delta + git: + apk: git + apt: git + brew: git + dnf: git + git-lfs: + brew: git-lfs + scoop: git-lfs + nb: + brew: nb + # :debian is defined so nothing will be installed on Debian for nb + nb:debian: + brew: [] + rsync: + apt: rsync + brew: rsync + choco: rsync + dnf: rsync + shotcut: + choco: shotcut + flatpak: org.shotcut.Shotcut + snap: shotcut + volta: + brew: volta + scoop: volta + wget: + apk: wget + apt: wget + brew: rsync + dnf: wget + whalebrew: whalebrew/wget + +dependencies: + git-lfs: + - git + +preinstall: + example-package: | + echo "preinstall routine" + +postinstall: + git-lfs: | + git lfs install + git-lfs:darwin: | + echo ":darwin is defined so this step will be used on Darwin with PowerShell" + git-lfs:windows: | + echo ":windows is defined so this step will be used on Windows with PowerShell" + nb: | + nb completions install + volta: | + volta setup + volta install node@latest diff --git a/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml b/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml new file mode 100644 index 00000000..b7983d64 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoiexternal.toml @@ -0,0 +1,58 @@ +[".vim/plugged/ale"] + type = "git-repo" + url = "https://github.com/dense-analysis/ale.git" + refreshPeriod = "140h" + [".vim/plugged/ale".pull] + args = ["--ff-only"] +[".vim/plugged/ale"] + type = "git-repo" + url = "https://github.com/pearofducks/ansible-vim.git" + refreshPeriod = "140h" + [".vim/plugged/ale".pull] + args = ["--ff-only"] +[".vim/plugged/ale"] + type = "git-repo" + url = "https://github.com/dense-analysis/ale.git" + refreshPeriod = "140h" + [".vim/plugged/ale".pull] + args = ["--ff-only"] +[".vim/plugged/ale"] + type = "git-repo" + url = "https://github.com/dense-analysis/ale.git" + refreshPeriod = "140h" + [".vim/plugged/ale".pull] + args = ["--ff-only"] +[".vim/plugged/ale"] + type = "git-repo" + url = "https://github.com/dense-analysis/ale.git" + refreshPeriod = "140h" + [".vim/plugged/ale".pull] + args = ["--ff-only"] + + + +https://github.com/pearofducks/ansible-vim.git +https://github.com/neoclide/coc.nvim.git +https://github.com/ekalinin/dockerfile.vim.git +https://github.com/editorconfig/editorconfig-vim.git +https://github.com/junegunn/fzf.git +https://github.com/junegunn/fzf.vim.git +https://github.com/itchyny/lightline.vim.git +https://github.com/scrooloose/nerdtree.git +https://github.com/stanangeloff/php.vim.git +https://github.com/hdima/python-syntax.git +https://github.com/vim-syntastic/syntastic.git +https://github.com/vim-airline/vim-airline.git +https://github.com/kristijanhusak/vim-carbon-now-sh.git +https://github.com/ryanoasis/vim-devicons.git +https://github.com/tpope/vim-fugitive.git +https://github.com/airblade/vim-gitgutter.git +https://github.com/fatih/vim-go.git +https://github.com/pangloss/vim-javascript.git +https://github.com/mxw/vim-jsx.git +https://github.com/plasticboy/vim-markdown.git +https://github.com/terryma/vim-multiple-cursors.git +https://github.com/prettier/vim-prettier.git +https://github.com/tpope/vim-sensible.git +https://github.com/tpope/vim-surround.git +https://github.com/nanotee/zoxide.vim.git \ No newline at end of file diff --git a/dotfiles/.local/share/chezmoi/.chezmoiignore b/dotfiles/.local/share/chezmoi/.chezmoiignore new file mode 100644 index 00000000..e69de29b diff --git a/dotfiles/.local/share/chezmoi/.chezmoitemplates/chassis-info b/dotfiles/.local/share/chezmoi/.chezmoitemplates/chassis-info new file mode 100644 index 00000000..3d15e2c7 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoitemplates/chassis-info @@ -0,0 +1,12 @@ +{{- $chassisType := "desktop" }} +{{- if eq .chezmoi.os "darwin" }} +{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }} +{{- $chassisType = "laptop" }} +{{- else }} +{{- $chassisType = "desktop" }} +{{- end }} +{{- else if eq .chezmoi.os "linux" }} +{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }} +{{- else if eq .chezmoi.os "windows" }} +{{- $chassisType = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "if ((Get-CimInstance -Class Win32_Battery | Measure-Object).Count -gt 0) { Write-Output 'laptop' } else { Write-Output 'desktop' }") | trim }} +{{- end }} diff --git a/dotfiles/.local/share/chezmoi/.chezmoitemplates/cpu-info b/dotfiles/.local/share/chezmoi/.chezmoitemplates/cpu-info new file mode 100644 index 00000000..4c52ba12 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoitemplates/cpu-info @@ -0,0 +1,12 @@ +{{- $cpuCores := 1 }} +{{- $cpuThreads := 1 }} +{{- if eq .chezmoi.os "darwin" }} +{{- $cpuCores = (output "sysctl" "-n" "hw.physicalcpu_max") | trim | atoi }} +{{- $cpuThreads = (output "sysctl" "-n" "hw.logicalcpu_max") | trim | atoi }} +{{- else if eq .chezmoi.os "linux" }} +{{- $cpuCores = (output "sh" "-c" "lscpu --online --parse | grep --invert-match '^#' | sort --field-separator=',' --key='2,4' --unique | wc --lines") | trim | atoi }} +{{- $cpuThreads = (output "sh" "-c" "lscpu --online --parse | grep --invert-match '^#' | wc --lines") | trim | atoi }} +{{- else if eq .chezmoi.os "windows" }} +{{- $cpuCores = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "(Get-CimInstance -ClassName 'Win32_Processor').NumberOfCores") | trim | atoi }} +{{- $cpuThreads = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "(Get-CimInstance -ClassName 'Win32_Processor').NumberOfLogicalProcessors") | trim | atoi }} +{{- end }} diff --git a/dotfiles/.local/share/chezmoi/.chezmoitemplates/profile.sh b/dotfiles/.local/share/chezmoi/.chezmoitemplates/profile.sh new file mode 100644 index 00000000..63e11204 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/.chezmoitemplates/profile.sh @@ -0,0 +1,315 @@ +# shellcheck disable=SC1090,SC1091 + +### Miscellaneous +export VISUAL="code --wait" +export EDITOR=$VISUAL + +### Theme +export COLOR_SCHEME=dark + +### Colorize man pages +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' +export LESSHISTFILE=- + +### Line Wrap +setterm -linewrap on 2>/dev/null + +# Aliases / Functions +if [ -f "$HOME/.local/aliases" ]; then + . "$HOME/.local/aliases" +fi +if [ -f "$HOME/.local/functions" ]; then + . "$HOME/.local/functions" +fi + +### Bash / ZSH +if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ] || [ "$0" = 'zsh' ] || [ "$0" = '/bin/zsh' ]; then + ### OS Detection + if [ -f /etc/os-release ]; then + . /etc/os-release + if [ "$ID" = 'alpine' ]; then + OS_ICON="" + elif [ "$ID" = 'arch' ]; then + OS_ICON="" + elif [ "$ID" = 'centos' ]; then + OS_ICON="" + elif [ "$ID" = 'coreos' ]; then + OS_ICON="" + elif [ "$ID" = 'debian' ]; then + OS_ICON="" + elif [ "$ID" = 'deepin' ]; then + OS_ICON="" + elif [ "$ID" = 'elementary' ]; then + OS_ICON="" + elif [ "$ID" = 'endeavour' ]; then + OS_ICON="" + elif [ "$ID" = 'freebsd' ]; then + OS_ICON="" + elif [ "$ID" = 'gentoo' ]; then + OS_ICON="" + elif [ "$ID" = 'kali' ]; then + OS_ICON="" + elif [ "$ID" = 'linuxmint' ]; then + OS_ICON="" + elif [ "$ID" = 'manjaro' ]; then + OS_ICON="" + elif [ "$ID" = 'nixos' ]; then + OS_ICON="" + elif [ "$ID" = 'openbsd' ]; then + OS_ICON="" + elif [ "$ID" = 'opensuse' ]; then + OS_ICON="" + elif [ "$ID" = 'parrot' ]; then + OS_ICON="" + elif [ "$ID" = 'pop_os' ]; then + OS_ICON="" + elif [ "$ID" = 'raspberry_pi' ]; then + OS_ICON="" + elif [ "$ID" = 'redhat' ]; then + OS_ICON="" + elif [ "$ID" = 'fedora' ]; then + OS_ICON="" + elif [ "$ID" = 'ubuntu' ]; then + OS_ICON="" + else + OS_ICON="" + fi + else + if [ -d /Applications ] && [ -d /Library ] && [ -d /System ]; then + # macOS + OS_ICON="" + else + OS_ICON="" + fi + fi + + ### ASDF + if [ -f "$HOME/.local/asdf/asdf.sh" ]; then + export ASDF_CONFIG_FILE="$HOME/.config/asdf/asdfrc" + export ASDF_DIR="$HOME/.local/asdf" + export ASDF_DATA_DIR="$HOME/.local/asdf-data" + export ASDF_CRATE_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-cargo-pkgs + export ASDF_GEM_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-ruby-pkgs + export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-golang-pkgs + export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-python-pkgs + . "$HOME/.local/asdf/asdf.sh" + fi + + ### MOTD + # Add file named .hushlogin in the user's home directory to disable the MOTD + if [ ! -f ~/.hushlogin ] && [ "$SHLVL" -eq 1 ]; then + if [ -f "$HOME/.local/motd.sh" ] && { [ -n "$SSH_CONNECTION" ] && [[ $- == *i* ]]; } || command -v qubes-vmexec > /dev/null || command -v qubes-dom0-update > /dev/null || { [ -d /Applications ] && [ -d /System ]; }; then + if { [ -z "$MOTD" ] || [ "$MOTD" -ne 0 ]; } && [[ "$(hostname)" != *'-minimal' ]]; then + . "$HOME/.local/motd.sh" + # TODO - -- services + if [ -n "$SSH_CONNECTION" ]; then + # SSH + bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login + elif command -v qubes-vmexec > /dev/null; then + # Qubes AppVM + bash_motd --banner --memory --diskspace --docker --updates + elif command -v qubes-dom0-update > /dev/null; then + # Qubes dom0 + bash_motd --banner --updates + elif [ -d /Applications ] && [ -d /System ]; then + # macOS + bash_motd --banner + else + bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login + fi + fi + fi + fi +fi + +### Colorize +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +alias diff='diff --color=auto' +alias ip='ip --color=auto' +alias pacman='pacman --color=auto' + +### Aliases (better defaults for simple commands) +alias cp='cp -v' +alias rm='rm -I' +alias mv='mv -iv' +alias ln='ln -sriv' +alias xclip='xclip -selection c' +command -v vim > /dev/null && alias vi='vim' + +### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances) +command -v htop > /dev/null && alias top='htop' +command -v gotop > /dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' +command -v ytop > /dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")' +command -v btm > /dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")' +# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme +command -v bashtop > /dev/null && alias top='bashtop' +command -v bpytop > /dev/null && alias top='bpytop' +command -v glances > /dev/null && alias top='glances' + +# vim as default +export EDITOR="vim" + +# Don’t clear the screen after quitting a manual page +export MANPAGER="less -X" + +### .local/bin +export PATH="$PATH:$HOME/.local/bin" + +### Cargo +if [ -f "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi + +### GTK +export XDG_CONFIG_HOME="$HOME/.config" +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" + +### Homebrew +if [ -d /home/linuxbrew/.linuxbrew/bin ]; then + export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" + export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar" + export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew" + export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}" + export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:" + export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}" + export WHALEBREW_INSTALL_PATH="/home/linuxbrew/.linuxbrew/whalebrew" +fi + +### Whalebrew +export WHALEBREW_CONFIG_DIR="$HOME/.config/whalebrew" + +### Go +export GOPATH="${HOME}/.local/go" +export GO111MODULE=on +export PATH="$PATH:${GOPATH}/bin" +if command -v go > /dev/null && which go | grep -q 'asdf' > /dev/null && command -v asdf > /dev/null; then + GOROOT="$(asdf where golang)/go" + export GOROOT + export PATH="$PATH:${GOROOT}/bin" +elif command -v go > /dev/null && command -v brew > /dev/null; then + GOROOT="$(brew --prefix go)/libexec" + export GOROOT + export PATH="$PATH:${GOROOT}/bin" +fi + +### Android Studio +if [ -d ~/Library/Android ]; then + export PATH="$PATH:~/Library/Android/sdk/cmdline-tools/latest/bin" + export PATH="$PATH:~/Library/Android/sdk/platform-tools" + export PATH="$PATH:~/Library/Android/sdk/tools/bin" + export PATH="$PATH:~/Library/Android/sdk/tools" +fi +export ANDROID_SDK_HOME="$HOME/.local/android-sdk" + +### Azure CLI +export AZURE_CONFIG_DIR="$HOME/.config/azure" + +### bat +export BAT_CONFIG_PATH="$HOME/.config/batrc" +if command -v bat > /dev/null; then + export MANPAGER="sh -c 'col -bx | bat -l man -p'" + alias bathelp='bat --plain --language=help' + alias cat='bat --paging=never' + alias less='bat' + help() { + "$@" --help 2>&1 | bathelp + } +fi + +### BitWarden +# https://bitwarden.com/help/cli/#using-an-api-key +# BW_CLIENTID client_id +# BW_CLIENTSECRET + +### curlie +if command -v curlie > /dev/null; then + alias curl='curlie' +fi + +### Elastic Agent +# https://www.elastic.co/guide/en/fleet/current/agent-environment-variables.html#env-common-vars + +### exa +if command -v exa > /dev/null; then + alias ls='exa --long --all --color auto --icons --sort=type' + alias tree='exa --tree' +fi + +### fzf +if command -v fd > /dev/null; then + export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git' + export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +fi + +### Git +export GIT_MERGE_AUTOEDIT=no + +### gitfuzzy +export GF_BAT_STYLE=changes +export GF_BAT_THEME=zenbur +export GF_SNAPSHOT_DIRECTORY="$HOME/.local/git-fuzzy-snapshots" +if command -v delta > /dev/null; then + export GF_PREFERRED_PAGER="delta --theme=gruvbox --highlight-removed -w __WIDTH__" +fi + +### gping +# Replacement for ping that includes graph +if command -v gping > /dev/null; then + alias ping='gping' +fi + +### McFly +export MCFLY_FUZZY=2 +export MCFLY_RESULTS=14 +export MCFLY_KEY_SCHEME=vim + +### nnn +if command -v nnn > /dev/null; then + alias n='nnn -de' + alias N='sudo -E nnn -dH' + alias nnn-install-plugins='curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh' + export NNN_RCLONE='rclone mount --read-only --no-checksum' + export NNN_SSHFS='sshfs -o reconnect,idmap=user,cache_timeout=3600' +fi + +### Poetry +export POETRY_HOME="$HOME/.local/poetry" +export PATH="$POETRY_HOME/bin:$PATH" + +### Rear +# https://github.com/rear/rear/blob/master/doc/user-guide/03-configuration.adoc + +### ripgrep +export RIPGREP_CONFIG_PATH="$HOME/.config/ripgreprc" + +### Ruby +export GEM_HOME="$HOME/.local/gems" +export PATH="$PATH:$GEM_HOME/bin" + +### Volta +export VOLTA_HOME="$HOME/.local/volta" +export PATH="$VOLTA_HOME/bin:$PATH" + +### SDKMan +if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then + export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec" + . "$SDKMAN_DIR/bin/sdkman-init.sh" +elif [ -f "$SDKMAN_DIR/bin/sdkman-init.sh" ]; then + export SDKMAN_DIR="$HOME/.local/sdkman" + . "$SDKMAN_DIR/bin/sdkman-init.sh" +fi + +### Vagrant +export VAGRANT_DEFAULT_PROVIDER=virtualbox +export VAGRANT_HOME="$HOME/.local/vagrant.d" + +### wget +export WGETRC="$HOME/.config/wgetrc" diff --git a/dotfiles/.local/share/chezmoi/dot_bashrc.tmpl b/dotfiles/.local/share/chezmoi/dot_bashrc.tmpl new file mode 100644 index 00000000..e69de29b diff --git a/dotfiles/.local/share/chezmoi/dot_gitconfig.tmpl b/dotfiles/.local/share/chezmoi/dot_gitconfig.tmpl new file mode 100644 index 00000000..72bfd83e --- /dev/null +++ b/dotfiles/.local/share/chezmoi/dot_gitconfig.tmpl @@ -0,0 +1,2 @@ +[user] + email = {{ .email | quote }} diff --git a/dotfiles/.local/share/chezmoi/dot_profile.tmpl b/dotfiles/.local/share/chezmoi/dot_profile.tmpl new file mode 100644 index 00000000..bcab01b6 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/dot_profile.tmpl @@ -0,0 +1 @@ +HOSTNAME={{- .chezmoi.hostname }} diff --git a/dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl b/dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl new file mode 100644 index 00000000..6f71ee35 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.tmpl @@ -0,0 +1,3 @@ +{{ range gitHubKeys "$GITHUB_USERNAME" -}} +{{ .Key }} +{{ end -}} diff --git a/dotfiles/.local/share/chezmoi/run_once_before_install-software.sh.tmpl b/dotfiles/.local/share/chezmoi/run_once_before_install-software.sh.tmpl new file mode 100644 index 00000000..ce0ede6a --- /dev/null +++ b/dotfiles/.local/share/chezmoi/run_once_before_install-software.sh.tmpl @@ -0,0 +1,8 @@ +{{- if eq .chezmoi.os "darwin" -}} +#!/bin/bash + +brew bundle --no-lock --file=/dev/stdin <