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
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "dotfiles",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"postCreateCommand": "./install.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker",
"sharat.vscode-brewfile"
]
}
}
}
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build Docker image
run: docker build . -t dotfiles
Expand All @@ -34,16 +34,20 @@ jobs:
steps:
- name: Remove existing awscli
run: |
rm /usr/local/bin/2to3
rm /usr/local/bin/aws
rm /usr/local/bin/aws_completer
rm -f /usr/local/bin/2to3* || true
rm -f /usr/local/bin/aws || true
rm -f /usr/local/bin/aws_completer || true
if: ${{ startsWith(matrix.os, 'macos') }}
- name: Unlink preinstalled node
run: brew unlink node@16
run: brew unlink node@22 || brew unlink node@20 || brew unlink node@18 || true
if: ${{ startsWith(matrix.os, 'macos') }}

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Skip Homebrew Casks
run: echo "HOMEBREW_BUNDLE_CASK_SKIP=$(HOMEBREW_NO_AUTO_UPDATE=1 brew bundle list --casks --file install/Brewfile | tr '\n' ' ')" >> $GITHUB_ENV
if: ${{ startsWith(matrix.os, 'macos') }}

- name: Run install command
run: ./install.sh
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ FROM ubuntu:latest

LABEL Name=dotfiles

RUN apt-get -y update && apt-get install -y --no-install-recommends make sudo
RUN apt-get -y update && apt-get install -y --no-install-recommends make sudo adduser

# Add user
RUN addgroup --gid 1000 user \
&& adduser --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --uid 1000 --disabled-password --gid 1000 user
# Add user (use different GID to avoid conflicts with existing ubuntu user)
RUN groupadd -g 1001 user \
&& useradd -m -u 1001 -g 1001 -c "First Last,RoomNumber,WorkPhone,HomePhone" -s /bin/bash user
RUN echo "user ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers

USER user
Expand All @@ -16,4 +16,4 @@ ADD . .

ENV CI=1

CMD bash -c './install.sh && if [[ -n $(zsh -c return) ]]; then exit 1; fi'
CMD ["bash", "-c", "./install.sh && if [[ -n $(zsh -c return) ]]; then exit 1; fi"]
2 changes: 0 additions & 2 deletions install/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ brew "mas"
brew "mysql", restart_service: true
# Platform built on V8 to build network applications
brew "node"
# Platform built on V8 to build network applications
brew "node@16"
# Shell command parallelization utility
brew "parallel"
# General-purpose scripting language
Expand Down
39 changes: 0 additions & 39 deletions install/Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2192,45 +2192,6 @@
}
}
},
"node@16": {
"version": "16.17.0",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:8058af2eb34df2839a23a55cb8cb6d4df7632484695a172a5e6b1873d0fecd44",
"sha256": "8058af2eb34df2839a23a55cb8cb6d4df7632484695a172a5e6b1873d0fecd44"
},
"arm64_big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:3aba0ec892bf7a15ad2fad870dc26c11d39a9476622f9c0d28f31de7254a2a45",
"sha256": "3aba0ec892bf7a15ad2fad870dc26c11d39a9476622f9c0d28f31de7254a2a45"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:03ea2f9c2df1c3b0b39eadcfd22b56fb2a41fb93620ba77c0b8f0db652d22cfe",
"sha256": "03ea2f9c2df1c3b0b39eadcfd22b56fb2a41fb93620ba77c0b8f0db652d22cfe"
},
"big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:b5faacaa19856e18e85a7c2830d82d879b3a0fce2f3296509925aaa739874b85",
"sha256": "b5faacaa19856e18e85a7c2830d82d879b3a0fce2f3296509925aaa739874b85"
},
"catalina": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:25ed0921163ae9b71c51ac0978c59419db14e630d609d7a6b9cf219ba7963c1d",
"sha256": "25ed0921163ae9b71c51ac0978c59419db14e630d609d7a6b9cf219ba7963c1d"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/node/16/blobs/sha256:f09c9862d44fec050060b662a64e28da5db8d6229a6daacc559e0524bcb47fe4",
"sha256": "f09c9862d44fec050060b662a64e28da5db8d6229a6daacc559e0524bcb47fe4"
}
}
}
},
"rust": {
"version": "1.63.0",
"bottle": {
Expand Down
3 changes: 2 additions & 1 deletion runcom/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ for DOTFILE in "$DOTFILES_DIR"/system/.{path,function,function_*,alias,grep,prom
[ -f "$DOTFILE" ] && . "$DOTFILE"
done

if is-macos; then
# Source macOS-specific files when not in a Codespace
if [ -z "$CODESPACES" ] && is-macos; then
for DOTFILE in "$DOTFILES_DIR"/system/.{alias,function,fnm}.macos; do
[ -f "$DOTFILE" ] && . "$DOTFILE"
done
Expand Down
4 changes: 3 additions & 1 deletion system/.autojump
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Autojump

if is-executable autojump; then
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
# Cache brew prefix for performance (avoid multiple slow calls)
BREW_PREFIX=${BREW_PREFIX:-$(brew --prefix)}
[[ -s $BREW_PREFIX/etc/profile.d/autojump.sh ]] && . $BREW_PREFIX/etc/profile.d/autojump.sh
fi
4 changes: 3 additions & 1 deletion system/.completion
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Brew

if is-executable brew; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
# Cache brew prefix for performance (avoid multiple slow calls)
BREW_PREFIX=${BREW_PREFIX:-$(brew --prefix)}
FPATH=$BREW_PREFIX/share/zsh/site-functions:$FPATH

# This is done by oh-my-zsh
#autoload -Uz compinit
Expand Down
17 changes: 11 additions & 6 deletions system/.oh-my-zsh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ export ZSH=$HOME/.config/oh-my-zsh
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Performance: Disable marking untracked files under VCS as dirty.
# This makes repository status check for large repositories much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
Expand All @@ -59,10 +58,16 @@ VSCODE=code
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(dash docker git gitignore npm macos vscode)

# Add version manager when not in a Codespace
# Base plugins that work everywhere
plugins=(git gitignore npm docker vscode)

# Add macOS-specific plugins when not in a Codespace
if [ -z "$CODESPACES" ]; then
if is-macos; then
plugins+=(dash macos)
fi
# Add version manager (works on all platforms, skip in Codespaces)
plugins+=(asdf)
fi

Expand Down
11 changes: 7 additions & 4 deletions system/.prompt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Setup zsh-syntax-highlighting
if is-executable brew; then
ZSH_SYNTAX_HIGHLITING_FILE=$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
if [[ -f $ZSH_SYNTAX_HIGHLITING_FILE ]]; then
source $ZSH_SYNTAX_HIGHLITING_FILE
# Cache brew prefix for performance (avoid multiple slow calls)
BREW_PREFIX=${BREW_PREFIX:-$(brew --prefix)}

ZSH_SYNTAX_HIGHLIGHTING_FILE=$BREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
if [[ -f $ZSH_SYNTAX_HIGHLIGHTING_FILE ]]; then
source $ZSH_SYNTAX_HIGHLIGHTING_FILE
fi

# Setup zsh-autosuggestions
ZSH_AUTOSUGGEST_FILE=$(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_FILE=$BREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh
if [[ -f $ZSH_AUTOSUGGEST_FILE ]]; then
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history)
ZSH_AUTOSUGGEST_USE_ASYNC=true
Expand Down
Loading