Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .psmetadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 3,
"team": "exp_hands_on_principals",
"jira-project-key": "PET2",
"slack-channel": "#innersource",
"in-use": false,
"bc": "innersource"
}
2 changes: 1 addition & 1 deletion Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tap "buo/cask-upgrade"
tap "teamookla/speedtest"
tap "common-fate/granted"
brew "act"
brew "asdf"
brew "mise"
brew "awscli"
brew "bat"
brew "direnv"
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @ACloudGuru/principal-engineering-team @ACloudGuru/ci-admins
# TODO update when moved to ps-dev...
# * @ps-dev/trusted-committers-hands-on-tooling
7 changes: 3 additions & 4 deletions config/tabby/tabby/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,24 @@ terminal:
- '#8be9fd'
- '#ffffff'
font: Monaspace Xenon
ligatures: true
cursor: underline
customColorSchemes: []
fallbackFont: Victor Mono
hideTabIndex: true
fallbackFont: Monaspace Xenon
linePadding: 6
copyAsHTML: false
bell: audible
fontSize: 16
fontWeightBold: 400
fontWeight: 200
hideTabIndex: true
minimumContrastRatio: 5
ssh: {}
clickableLinks:
modifier: metaKey
accessibility:
animations: false
appearance:
dockFill: 1
vibrancy: true
hacks: {}
providerBlacklist: []
commandBlacklist: []
Expand Down
6 changes: 4 additions & 2 deletions config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ secret export GIT_USERNAME --silent

# Source environment extensions
source $DOTFILES/environment/npm.sh
source $DOTFILES/environment/asdf.sh
source $DOTFILES/environment/awssdk.sh
source $DOTFILES/environment/certs.sh
source $DOTFILES/environment/git.sh
Expand All @@ -44,5 +43,8 @@ source $DOTFILES/environment/upbrew.sh
source $DOTFILES/environment/utils.sh
source $DOTFILES/environment/weather.sh
source $DOTFILES/environment/yarn.sh
source $DOTFILES/environment/zim.sh
source $DOTFILES/environment/zsh.sh
source $DOTFILES/environment/mise.sh

# Source ZimFW last to reference all other environment extensions
source $DOTFILES/environment/zim.sh
2 changes: 2 additions & 0 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[VS-Code]: https://code.visualstucdio.com/
[ZimFW]: https://github.com/zimfw/zimfw

# @todo Replace ASDF with Mise https://mise.jdx.dev/

# Install

This repo is self-installing for consistent cross-machine configuration. [See tutorial for more info.](https://www.jakewiesler.com/blog/managing-dotfiles)
Expand Down
9 changes: 8 additions & 1 deletion environment/asdf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# ASDF
# http://asdf-vm.com/
# Add ASDF environment setup.
source $(brew --prefix asdf)/libexec/asdf.sh
#
## source $(brew --prefix asdf)/libexec/asdf.sh
# ☝️ not required since 0.16.1
# Leaving this here for reference and in case of future changes.
export ASDF_DIR="$HOME/.asdf"
export ASDF_DATA_DIR="$HOME/.asdf"
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
export ASDF_CONCURRENCY=auto
1 change: 1 addition & 0 deletions environment/certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export CERTIFICATE_BUNDLE=$HOME/.ssl/zscaler-bundle.pem
export REQUESTS_CA_BUNDLE=$CERTIFICATE_BUNDLE
export CURL_CA_BUNDLE=$CERTIFICATE_BUNDLE
export NODE_EXTRA_CA_CERTS=$CERTIFICATE_BUNDLE
export NODE_CA_CERTS_ENV_VAR=$CERTIFICATE_BUNDLE
export AWS_CA_BUNDLE=$CERTIFICATE_BUNDLE
export SSL_CERT_FILE=$CERTIFICATE_BUNDLE
16 changes: 16 additions & 0 deletions environment/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,19 @@
export GIT_CEILING_DIRECTORIES=$HOME

alias ghtoken="export GITHUB_TOKEN=\"$(gh auth token)\""

alias gt="gittower ."

# Utility to clone all repositories from a GitHub organization
# Requires a GITHUB_TOKEN env var with repo access
# Dependencies: gh, jq, parallel
# Usage: CloneAll <organization>
CloneAll() {
ORG=$1
page=1
while links=($(curl -H "Authorization: token ${GITHUB_TOKEN}" -s "https://api.github.com/orgs/${ORG}/repos?per_page=100&page=${page}" | jq -rc '.[] | {ssh_url} | .ssh_url')); [[ "$links" ]]
do
GIT_TERMINAL_PROMPT=0 parallel git clone --depth=1 {} ::: "${links[@]}"
((++page))
done
}
30 changes: 30 additions & 0 deletions environment/mise.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local __mise=mise
if (( ! $+commands[mise] )); then
if (( $+commands[rtx] )); then
__mise=rtx
else
return
fi
fi

# Load mise hooks
eval "$($__mise activate zsh)"

# Hook mise into current environment
eval "$($__mise hook-env -s zsh)"

COMPLETIONS_PATH="$HOMEBREW_PREFIX/share/zsh/site-functions/_mise"

# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `mise`. Otherwise, compinit will have already done that.
if [[ ! -f "$COMPLETIONS_PATH" ]]; then
typeset -g -A _comps
autoload -Uz _$__mise
_comps[$__mise]=_$__mise
fi

# Generate and load mise completion
$__mise completion zsh >| "$COMPLETIONS_PATH" &|

export NODE_PATH="$(mise which node)"
export NPM_PATH="$(mise which npm)"
6 changes: 1 addition & 5 deletions environment/pnpm.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
export PNPM_HOME="$HOME/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac

# PNPM shortcuts
alias p="pnpm"
alias pe="pnpm exec"
alias px="pnpx"
alias pa="pnpm add"
alias pr="pnpm remove"
alias pf="pnpm add --filter"
alias pd="pnpm add -D"
alias pdf="pnpm add -D --filter"
Expand Down
3 changes: 1 addition & 2 deletions environment/zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ COMPLETION_WAITING_DOTS="true"
# Disable marking untracked files under VCS as dirty
DISABLE_UNTRACKED_FILES_DIRTY="true"

# Enable auto-completion for shell commands on history search
# zstyle ':autocomplete:*' default-context history-incremental-search-backward
export ZSH_CACHE_DIR="$HOME/.cache/zsh"
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ command brew bundle install --file=$DOTFILES/brewfile
STOWS=$DOTFILES/config
echo -e "\n🔗 Linking Stow packages"
command stow -v -t $HOME -d $STOWS -S stow # link stow config before creating other links
command stow -v -t $HOME -d $STOWS -S asdf git npm zim zsh
command stow -v -t $HOME -d $STOWS -S git npm zim zsh

# Link Stow for Tabby to override default config path, can't read from dotfiles.
# @see https://github.com/Eugeny/tabby/discussions/9523
Expand Down