Update dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/symlink_Taskfile.yml, dotfiles/.local/share/chezmoi/home/run_update, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_10_install-aqua-packages.sh.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-packages.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-darwin.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-configure-darwin-shell.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-packages.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-z4h.tmpl, dotfiles/.local/share/chezmoi/home/dot_tool_versions.tmpl

Deleted dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_20_install-helm-plugins.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_30_install-krew-plugins.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_40_install-rust-toolchain.tmpl
This commit is contained in:
Brian Zalewski 2022-11-24 13:18:44 +00:00
parent f4ed7e62c3
commit 44d8c6f774
17 changed files with 110 additions and 89 deletions

View file

@ -1437,6 +1437,27 @@ softwarePlugins:
dotnet: dotnet:
plugins: plugins:
- Microsoft.CST.AttackSurfaceAnalyzer.CLI - Microsoft.CST.AttackSurfaceAnalyzer.CLI
helm:
plugins:
- https://github.com/databus23/helm-diff
- https://github.com/jkroepke/helm-secrets
krew:
plugins:
- access-matrix
- datree
- deprecations
- get-all
- konfig
- modify-secret
- neat
- node-shell
- resource-capacity
- score
- sniff
- tree
- tunnel
- view-allocations
- who-can
quicklook: quicklook:
plugins: plugins:
- plugin: apparency - plugin: apparency

View file

@ -12,7 +12,7 @@
{{- end }} {{- end }}
### Betelgeuse Theme ### Betelgeuse Theme
[".local/share"] [".local/share/betelgeuse"]
type = "git-repo" type = "git-repo"
url = "https://gitlab.com/megabyte-labs/misc/betelgeuse.git" url = "https://gitlab.com/megabyte-labs/misc/betelgeuse.git"
[".local/share".pull] [".local/share".pull]
@ -76,17 +76,13 @@
refreshPeriod = "{{ $refreshPeriod }}" refreshPeriod = "{{ $refreshPeriod }}"
### Taskfiles ### Taskfiles
[".local"] [".local/shared-common"]
type = "archive" type = "archive"
url = "https://gitlab.com/megabyte-labs/common/shared/-/archive/master/shared-master.tar.gz" url = "https://gitlab.com/megabyte-labs/common/shared/-/archive/master/shared-master.tar.gz"
exact = true exact = true
stripComponents = 3 stripComponents = 3
refreshPeriod = "{{ $refreshPeriod }}" refreshPeriod = "{{ $refreshPeriod }}"
include = ["taskfiles/**"] include = ["taskfiles/**"]
["Taskfile.yml"]
type = "file"
url = "https://gitlab.com/megabyte-labs/common/shared/-/raw/master/Taskfile.yml"
refreshPeriod = "{{ $refreshPeriod }}"
{{- if and (not .host.headless) (ne .chezmoi.os "windows") }} {{- if and (not .host.headless) (ne .chezmoi.os "windows") }}
### Neovim ### Neovim

View file

@ -1,4 +1,4 @@
{{ if eq .host.distro.id "arch" }} {{- if eq .host.distro.id "arch" }}
#!/usr/bin/env bash #!/usr/bin/env bash
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
@ -13,5 +13,13 @@
{{- $packages = concat $packages $pyenvDependencies -}} {{- $packages = concat $packages $pyenvDependencies -}}
{{- end }} {{- end }}
### Install base dependencies
sudo packan -Sy --noconfirm --needed {{ $packages | sortAlpha | uniq | join " " -}} sudo packan -Sy --noconfirm --needed {{ $packages | sortAlpha | uniq | join " " -}}
{{ end }}
### Install yay
if ! command -v yay > /dev/null; then
git clone https://aur.archlinux.org/yay.git /usr/local/src/yay
cd /usr/local/src/yay
makepkg -si
fi
{{- end -}}

View file

@ -1,5 +1,4 @@
{{- if eq .host.distro.id "darwin" }}
#!/usr/bin/env bash #!/usr/bin/env bash
set -x set -x
@ -434,7 +433,7 @@ defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -boo
# Disable the all too sensitive backswipe on Magic Mouse # Disable the all too sensitive backswipe on Magic Mouse
defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false
defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false
{{ if not .host.restricted }} {{- if not .host.restricted }}
############################################################################### ###############################################################################
# Settings that require administrator permissions # # Settings that require administrator permissions #
############################################################################### ###############################################################################
@ -472,3 +471,4 @@ sudo chflags nohidden ~/Library
# Show the /Volumes folder # Show the /Volumes folder
sudo chflags nohidden /Volumes sudo chflags nohidden /Volumes
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if eq .host.distro.id "darwin" }}
#!/usr/bin/env bash #!/usr/bin/env bash
set -eufo pipefail set -eufo pipefail
@ -13,3 +14,4 @@ if [[ ! -e /usr/local/bin/zsh ]]; then
fi fi
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if eq .host.distro.id "darwin" }}
#!/usr/bin/env bash #!/usr/bin/env bash
xcode-select -p >/dev/null 2>&1 || xcode-select --install xcode-select -p >/dev/null 2>&1 || xcode-select --install
@ -13,6 +14,7 @@ eval $(/opt/homebrew/bin/brew shellenv)
eval $(/usr/local/bin/brew shellenv) eval $(/usr/local/bin/brew shellenv)
{{- end }} {{- end }}
brew bundle --verbose --no-lock --file=/dev/stdin <<EOF # brew bundle --verbose --no-lock --file=/dev/stdin <<EOF
{{ includeTemplate "darwin/brewfile" . }} # includeTemplate "darwin/brewfile" . }}
EOF # EOF
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if eq .host.distro.id "ubuntu" }}
#!/usr/bin/env bash #!/usr/bin/env bash
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}}
@ -27,3 +28,4 @@
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends {{ $packages | sortAlpha | uniq | join " " -}} sudo apt-get install -y --no-install-recommends {{ $packages | sortAlpha | uniq | join " " -}}
{{- end -}}

View file

@ -1,8 +1,8 @@
{{ if .enableAquaInstall }} {{- if false }}
#!/usr/bin/env bash #!/usr/bin/env bash
set -eufo pipefail set -eufo pipefail
source $HOME/.config/shell/exports.sh source "$HOME/.config/shell/exports"
{{- $files := list -}} {{- $files := list -}}
{{- range $path := glob (list .chezmoi.sourceDir "private_dot_config/aqua/**/*.yaml.tmpl" | join "/") }} {{- range $path := glob (list .chezmoi.sourceDir "private_dot_config/aqua/**/*.yaml.tmpl" | join "/") }}
@ -16,4 +16,4 @@ fi
aqua update-aqua aqua update-aqua
aqua install -a aqua install -a
{{ end }} {{- end -}}

View file

@ -7,7 +7,6 @@ source $HOME/.config/shell/exports.sh
[ ! -d $ASDF_DIR ] && git clone https://github.com/asdf-vm/asdf.git "${ASDF_DIR}" [ ! -d $ASDF_DIR ] && git clone https://github.com/asdf-vm/asdf.git "${ASDF_DIR}"
. ${ASDF_DIR}/asdf.sh . ${ASDF_DIR}/asdf.sh
asdf plugin-add direnv
{{- if or .toolchains.java }} {{- if or .toolchains.java }}
asdf plugin-add java asdf plugin-add java
asdf plugin-add maven asdf plugin-add maven

View file

@ -1,15 +0,0 @@
{{- if .toolchains.extra -}}
#!/usr/bin/env bash
source $HOME/.config/shell/exports.sh
helm_plugins=(
https://github.com/databus23/helm-diff
https://github.com/jkroepke/helm-secrets
)
for plugin in "${helm_plugins[@]}"
do
echo Installing Helm plugin \"$plugin\"
helm plugin install $plugin 2>/dev/null|| true
done
{{- end -}}

View file

@ -1,40 +0,0 @@
{{- if .toolchains.extra -}}
#!/usr/bin/env bash
source $HOME/.config/shell/exports.sh
if [[ ! -e $KREW_ROOT/bin/kubectl-krew ]]; then
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)
fi
krew_plugins=(
access-matrix
datree
deprecations
get-all
konfig
modify-secret
neat
node-shell
resource-capacity
score
sniff
tree
tunnel
view-allocations
who-can
)
for plugin in "${krew_plugins[@]}"
do
echo Installing Krew plugin \"$plugin\"
$KREW_ROOT/bin/kubectl-krew install $plugin 2>/dev/null || true
done
{{- end -}}

View file

@ -1,6 +0,0 @@
{{- if .toolchains.rust -}}
#!/usr/bin/env bash
source $HOME/.config/shell/exports.sh
rustup-init -y --no-modify-path
{{- end -}}

View file

@ -1,4 +1,4 @@
{{- if .host.headless -}} {{- if and false .host.headless -}}
#!/usr/bin/env bash #!/usr/bin/env bash
Z4H_BOOTSTRAPPING=1 exec zsh && exit 0 Z4H_BOOTSTRAPPING=1 exec zsh && exit 0

View file

@ -0,0 +1,23 @@
{{- if .toolchains.go }}
golang system
{{- end -}}
{{- if .toolchains.java }}
java openjdk-17
{{- end -}}
{{- if .toolchains.node }}
deno system
nodejs system
{{- end -}}
{{- if .toolchains.php }}
php 8.1.12
{{- end -}}
{{- if .toolchains.python }}
poetry system
python system
{{- end -}}
{{- if .toolchains.ruby }}
ruby 3.1.1
{{- end -}}
{{- if .toolchains.rust }}
rust system
{{- end -}}

View file

@ -62,6 +62,8 @@ fi
export ANDROID_SDK_HOME="$XDG_DATA_HOME/android-sdk" export ANDROID_SDK_HOME="$XDG_DATA_HOME/android-sdk"
### Aqua ### Aqua
export AQUA_ROOT_DIR="$XDG_DATA_HOME/aqua"
export AQUA_GLOBAL_CONFIG="$XDG_CONFIG_HOME/aqua/aqua.yaml"
export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH" export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"
### ASDF ### ASDF
@ -165,6 +167,13 @@ export KDEHOME="$XDG_CONFIG_HOME/kde"
### Kodi ### Kodi
export KODI_DATA="$XDG_DATA_HOME/kodi" export KODI_DATA="$XDG_DATA_HOME/kodi"
### Krew
export KREW_ROOT="$XDG_DATA_HOME/krew"
### Maven
export MAVEN_CONFIG="$XDG_CONFIG_HOME/maven/settings.xml"
alias mvn="mvn -s $MAVEN_CONFIG"
### McFly ### McFly
export MCFLY_FUZZY=2 export MCFLY_FUZZY=2
export MCFLY_RESULTS=14 export MCFLY_RESULTS=14
@ -267,18 +276,27 @@ export SAVEHIST=5000
{{- if not .host.headless }} {{- if not .host.headless }}
if command -v code > /dev/null; then if command -v code > /dev/null; then
export EDITOR='code --wait' export EDITOR='code --wait'
export VISUAL="$EDITOR"
else else
# Source: https://unix.stackexchange.com/questions/4859/visual-vs-editor-what-s-the-difference # Source: https://unix.stackexchange.com/questions/4859/visual-vs-editor-what-s-the-difference
export EDITOR='vi -e' export EDITOR='vi -e'
if command -v nvim > /dev/null; then
export VISUAL='nvim -e'
else
export VISUAL="$EDITOR"
fi
fi fi
{{- else -}} {{- else -}}
export EDITOR='vi -e' export EDITOR='vi -e'
{{- end -}} if command -v nvim > /dev/null; then
export VISUAL='nvim -e'
else
export VISUAL="$EDITOR" export VISUAL="$EDITOR"
fi
{{- end -}}
{{- if eq .host.type "wsl" }} {{- if eq .host.type "wsl" }}
### WSL ### WSL
export LIBGL_ALWAYS_INDIRECT="1" export LIBGL_ALWAYS_INDIRECT="1"
export BROWSER='/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe' export BROWSER='/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe'
{{- end }} {{- end }}

View file

@ -1,23 +1,26 @@
{{ if eq .chezmoi.os "linux" }} {{ if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") }}
#!/bin/sh #!/bin/sh
echo "Run update hook" echo "Run update hook"
rm -rf ~/AppData rm -rf ~/AppData
{{ if or (eq .chezmoi.os "linux") }}
rm -rf ~/Library rm -rf ~/Library
{{ end }}
if [ -d "$HOME/.local/shared-common" ]; then
cp ~/.local/shared-common/Taskfile.yml ~/.local/Taskfile.yml
sed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml sed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml
ln -s ~/.local/taskfiles ~/.local/shared-common/common/.config/taskfiles
fi
{{ else if .chezmoi.os "darwin" }} {{ if (eq .chezmoi.os "darwin") }}
#!/bin/sh
rm -rf ~/AppData
if command -v gsed > /dev/null; then if command -v gsed > /dev/null; then
gsed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml gsed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml
else else
echo "Unable to fix ~/.local/Taskfile.yml because gsed GNU compatibility tool is not installed." echo "Unable to fix ~/.local/Taskfile.yml because gsed GNU compatibility tool is not installed."
fi fi
{{ end }}
{{ else if chezmoi.os "windows" }} {{ else if chezmoi.os "windows" }}

View file

@ -0,0 +1,8 @@
---
version: '3'
# Tasks defined here can be run by running `run local:default` for example if you wanted
# to run the task named default. See: https://taskfile.dev/. It is set up like this
# so you can also access our set of bundled tasks located in the `~/.local` folder.
tasks:
default: echo "Default task"