diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml b/dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml index a57d3044..a2fa8f78 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml +++ b/dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml @@ -1437,6 +1437,27 @@ softwarePlugins: dotnet: plugins: - 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: plugins: - plugin: apparency diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml b/dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml index 2ab2044b..c669c83e 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml @@ -12,7 +12,7 @@ {{- end }} ### Betelgeuse Theme -[".local/share"] +[".local/share/betelgeuse"] type = "git-repo" url = "https://gitlab.com/megabyte-labs/misc/betelgeuse.git" [".local/share".pull] @@ -76,17 +76,13 @@ refreshPeriod = "{{ $refreshPeriod }}" ### Taskfiles -[".local"] +[".local/shared-common"] type = "archive" url = "https://gitlab.com/megabyte-labs/common/shared/-/archive/master/shared-master.tar.gz" exact = true stripComponents = 3 refreshPeriod = "{{ $refreshPeriod }}" 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") }} ### Neovim diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-packages.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-packages.tmpl index 8a44f0e6..0199890c 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-packages.tmpl +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-packages.tmpl @@ -1,4 +1,4 @@ -{{ if eq .host.distro.id "arch" }} +{{- if eq .host.distro.id "arch" }} #!/usr/bin/env bash {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} @@ -13,5 +13,13 @@ {{- $packages = concat $packages $pyenvDependencies -}} {{- end }} +### Install base dependencies 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 -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-darwin.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-darwin.tmpl index 5364a0fd..e3dfaf51 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-darwin.tmpl +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-darwin.tmpl @@ -1,5 +1,4 @@ - - +{{- if eq .host.distro.id "darwin" }} #!/usr/bin/env bash set -x @@ -434,7 +433,7 @@ defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -boo # Disable the all too sensitive backswipe on Magic Mouse defaults write com.google.Chrome 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 # ############################################################################### @@ -472,3 +471,4 @@ sudo chflags nohidden ~/Library # Show the /Volumes folder sudo chflags nohidden /Volumes {{- end -}} +{{- end -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-configure-darwin-shell.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-configure-darwin-shell.tmpl index e3ccb385..d9b13659 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-configure-darwin-shell.tmpl +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-configure-darwin-shell.tmpl @@ -1,3 +1,4 @@ +{{- if eq .host.distro.id "darwin" }} #!/usr/bin/env bash set -eufo pipefail @@ -13,3 +14,4 @@ if [[ ! -e /usr/local/bin/zsh ]]; then fi {{- end -}} {{- end -}} +{{- end -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl index 985ba881..5f269e2d 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl @@ -1,3 +1,4 @@ +{{- if eq .host.distro.id "darwin" }} #!/usr/bin/env bash 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) {{- end }} -brew bundle --verbose --no-lock --file=/dev/stdin </dev/null|| true -done -{{- end -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_30_install-krew-plugins.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_30_install-krew-plugins.tmpl deleted file mode 100644 index c11e16f7..00000000 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_30_install-krew-plugins.tmpl +++ /dev/null @@ -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 -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_40_install-rust-toolchain.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_40_install-rust-toolchain.tmpl deleted file mode 100644 index 55b0a8ea..00000000 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_40_install-rust-toolchain.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- if .toolchains.rust -}} -#!/usr/bin/env bash - -source $HOME/.config/shell/exports.sh -rustup-init -y --no-modify-path -{{- end -}} diff --git a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-z4h.tmpl b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-z4h.tmpl index 64372238..9907f90c 100644 --- a/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-z4h.tmpl +++ b/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-z4h.tmpl @@ -1,4 +1,4 @@ -{{- if .host.headless -}} +{{- if and false .host.headless -}} #!/usr/bin/env bash Z4H_BOOTSTRAPPING=1 exec zsh && exit 0 diff --git a/dotfiles/.local/share/chezmoi/home/dot_tool_versions.tmpl b/dotfiles/.local/share/chezmoi/home/dot_tool_versions.tmpl new file mode 100644 index 00000000..0c7998cf --- /dev/null +++ b/dotfiles/.local/share/chezmoi/home/dot_tool_versions.tmpl @@ -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 -}} diff --git a/dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports b/dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports index d685aa0d..cbba06e4 100644 --- a/dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports +++ b/dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports @@ -62,6 +62,8 @@ fi export ANDROID_SDK_HOME="$XDG_DATA_HOME/android-sdk" ### 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" ### ASDF @@ -165,6 +167,13 @@ export KDEHOME="$XDG_CONFIG_HOME/kde" ### 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 export MCFLY_FUZZY=2 export MCFLY_RESULTS=14 @@ -267,18 +276,27 @@ export SAVEHIST=5000 {{- if not .host.headless }} if command -v code > /dev/null; then export EDITOR='code --wait' + export VISUAL="$EDITOR" else # Source: https://unix.stackexchange.com/questions/4859/visual-vs-editor-what-s-the-difference export EDITOR='vi -e' + if command -v nvim > /dev/null; then + export VISUAL='nvim -e' + else + export VISUAL="$EDITOR" + fi fi {{- else -}} export EDITOR='vi -e' +if command -v nvim > /dev/null; then + export VISUAL='nvim -e' +else + export VISUAL="$EDITOR" +fi {{- end -}} -export VISUAL="$EDITOR" {{- if eq .host.type "wsl" }} ### WSL export LIBGL_ALWAYS_INDIRECT="1" export BROWSER='/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe' - {{- end }} diff --git a/dotfiles/.local/share/chezmoi/home/run_update b/dotfiles/.local/share/chezmoi/home/run_update index bd0db755..ae07f42e 100644 --- a/dotfiles/.local/share/chezmoi/home/run_update +++ b/dotfiles/.local/share/chezmoi/home/run_update @@ -1,23 +1,26 @@ -{{ if eq .chezmoi.os "linux" }} +{{ if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") }} #!/bin/sh echo "Run update hook" rm -rf ~/AppData +{{ if or (eq .chezmoi.os "linux") }} rm -rf ~/Library +{{ end }} -sed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml - -{{ else if .chezmoi.os "darwin" }} -#!/bin/sh - -rm -rf ~/AppData +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 + ln -s ~/.local/taskfiles ~/.local/shared-common/common/.config/taskfiles +fi +{{ if (eq .chezmoi.os "darwin") }} if command -v gsed > /dev/null; then gsed -i 's/\.\/\.config\/taskfiles/taskfiles/g' ~/.local/Taskfile.yml else echo "Unable to fix ~/.local/Taskfile.yml because gsed GNU compatibility tool is not installed." fi +{{ end }} {{ else if chezmoi.os "windows" }} diff --git a/dotfiles/.local/share/chezmoi/home/symlink_Taskfile.yml b/dotfiles/.local/share/chezmoi/home/symlink_Taskfile.yml new file mode 100644 index 00000000..37501977 --- /dev/null +++ b/dotfiles/.local/share/chezmoi/home/symlink_Taskfile.yml @@ -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"