Skip to content

Commit 9efa398

Browse files
committed
Merge branch 'main' of github.com:ADGEfficiency/dotfiles into wsl-2025-09-20
2 parents 4ff66dc + 00ec937 commit 9efa398

File tree

20 files changed

+1146
-61
lines changed

20 files changed

+1146
-61
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ jobs:
99
XDG_CONFIG_HOME: ${{ github.workspace }}
1010
steps:
1111
- uses: actions/checkout@v3
12+
- run: rm ~/.bashrc ~/.bash_profile
13+
# not brew packages as it's annoying to do the $PATH changes after install....
14+
- run: make setup-ubuntu -o brew-pkgs
1215
macos:
1316
runs-on: macos-latest
1417
env:
1518
XDG_CONFIG_HOME: ${{ github.workspace }}
1619
NIXPKGS_ALLOW_BROKEN: 1
1720
steps:
1821
- uses: actions/checkout@v3
22+
- run: rm ~/.bashrc ~/.bash_profile
23+
# not brew packages as it's annoying to do the $PATH changes after install....
24+
- run: make setup-macos -o brew-pkgs

Makefile

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,45 @@
11
default:
22
@echo "hello ^^"
33

4-
.PHONY: setup-macos setup-ubuntu setup-wsl setup-common setup-stow
4+
.PHONY: setup-common setup-macos setup-ubuntu setup-wsl
55

66
setup-common:
77
bash ./tmux/setup.sh
88
bash ./zsh/setup.sh
99
bash ./fzf/setup.sh
10+
bash ./scripts/setup-extras.sh
1011

1112
setup-macos: export OS=macos
12-
setup-macos: brew-pkgs nix-pkgs dotfiles setup-common
13+
setup-macos: brew-pkgs dotfiles setup-common setup-python
1314
bash ./macos/setup.sh
1415

1516
setup-ubuntu: export OS=ubuntu
16-
setup-ubuntu: dotfiles nix-pkgs dotfiles setup-common
17+
setup-ubuntu: brew-pkgs dotfiles setup-common
1718
bash ./ubuntu/setup.sh
1819

1920
setup-wsl: export OS=wsl
20-
setup-wsl: dotfiles nix-pkgs dotfiles setup-common
21+
setup-wsl: dotfiles setup-common
2122

23+
.PHONY: setup-stow dotfiles
24+
25+
STOW_ARGS=-vv
2226
setup-stow:
2327
bash ./stow/setup.sh
2428

25-
.PHONY: dotfiles test
26-
27-
STOW_ARGS=-vv
2829
dotfiles: setup-stow
29-
stow "$(STOW_ARGS)" -d dotfiles -t "$(HOME)"$(OS)
30+
stow "$(STOW_ARGS)" -d dotfiles -t "$(HOME)" "$(OS)"
3031
stow "$(STOW_ARGS)" dotfiles
3132
stow "$(STOW_ARGS)" yabai
3233
ln -sf ~/dotfiles/fish ~/.config/fish\
3334

34-
test: setup-nix
35-
bash ./nix/load-$(OS).sh && bash ./tests/*.sh
36-
37-
.PHONY: setup-uv python js
3835

3936
setup-uv:
4037
bash ./python/setup-uv.sh
4138

42-
python: setup-uv
39+
setup-python: setup-uv
4340
cd ~ && ~/.local/bin/uv venv --python 3.11.9
4441
~/.local/bin/uv pip install -r ./python/pyproject.toml
4542

46-
js:
47-
npm install -g remark-cli remark-lint remark-preset-lint-consistent remark-preset-lint-markdown-style-guide remark-preset-lint-recommended remark-stringify jsonlint jshint sql-language-server @tailwindcss/language-server markserv
48-
4943
.PHONY: clean-nvim setup-vim
5044

5145
clean-nvim:
@@ -69,13 +63,7 @@ setup-nix:
6963

7064
NIX_ARGS=--extra-experimental-features nix-command --extra-experimental-features flakes
7165
nix-pkgs: setup-nix
72-
<<<<<<< HEAD
73-
. ./nix/load-"$(OS)".sh && cd nix && nix flake update $(NIX_ARGS) && (nix profile upgrade $(NIX_ARGS) nix || nix profile install $(NIX_ARGS) .)
74-
||||||| 99ba32c
75-
. ./nix/load-$(OS).sh && cd nix && nix flake update $(NIX_ARGS) && nix profile install $(NIX_ARGS)
76-
=======
7766
. ./nix/load-"$(OS)".sh && cd nix && nix flake update "$(NIX_ARGS)" && (nix profile upgrade "$(NIX_ARGS)" nix || nix profile install "$(NIX_ARGS)" .)
78-
>>>>>>> 204fef1e307c84bddae0b0e0618cd3fd5c973deb
7967

8068
.PHONY: setup-brew brew-pkgs
8169

@@ -84,6 +72,4 @@ setup-brew:
8472
brew update; brew upgrade
8573

8674
brew-pkgs: setup-brew
87-
brew install hadolint vale actionlint mactex pandoc fzf keychain wordnet entr
88-
brew install koekeishiya/formulae/yabai
89-
brew install koekeishiya/formulae/skhd
75+
brew bundle --file ~/dotfiles/brew/Brewfile --no-upgrade

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
Setup and configuration for my terminal based developer workflow (MacOS/Ubuntu):
44

5-
- Zsh for a shell
6-
- Nix for package management of shell programs
7-
- uv for Python
8-
- Neovim for text editing
9-
- Stow for dotfiles management
5+
- **Zsh** for a shell
6+
- **Homebrew** for shell tools
7+
- **mise** for programming language runtimes (except Python)
8+
- **uv** for Python runtime and virtual environments
9+
- **Neovim** for text editing
10+
- **Stow** for dotfiles symlinking
1011

11-
This repo should be cloned into `$HOME` and set as `$XDG_CONFIG_HOME`.
12+
This repo should be cloned into `$HOME` and set as `$XDG_CONFIG_HOME`. Many tools rely on setting this for the config stored in this repo to work. For other config that requires files in `$HOME` (such as `$HOME/.bashrc`) Stow is used to symlimk files.
1213

1314
You can setup your machine using commands in `Makefile`. Commonly setting up a machine involves:
1415

15-
- Installing packages with Nix or Homebrew
16+
- Installing packages with Homebrew
1617
- Setting up symlinks with Stow
1718
- Setting up tmux & Zsh
19+
- Installing language runtimes with mise
1820

1921
## Use
2022

@@ -30,20 +32,24 @@ This will also setup dependencies with Nix.
3032

3133
### macOS
3234

33-
Setup an macOS machine:
35+
Setup a macOS machine:
3436

3537
```shell-session
3638
$ make setup-macos
3739
```
3840

39-
This will also setup dependencies with Nix.
41+
This will:
42+
- Install Homebrew if not already installed
43+
- Install all packages from the Brewfile
44+
- Setup dotfiles with Stow
45+
- Configure tmux, Zsh, and fzf
4046

4147
### Python
4248

4349
Install `uv` and setup a global Python installation in a virtual environment:
4450

4551
```bash
46-
$ make python
52+
$ make setup-python
4753
```
4854

4955
## Components
@@ -70,21 +76,21 @@ You can run the setup without bootstrapping Stow with:
7076
$ make dotfiles OS=macos -o setup-stow
7177
```
7278

73-
### Nix
79+
### Homebrew
7480

75-
Install packages with Nix from a Nix Flake - I use Nix for things like direnv and Neovim:
81+
Install packages with Homebrew from the Brewfile:
7682

7783
```shell-session
78-
$ make nix-pkgs
84+
$ make brew-pkgs
7985
```
8086

81-
This will setup dependencies with Nix from `./nix/flake.nix`.
87+
This will:
88+
- Install Homebrew if not already installed
89+
- Install all packages defined in `./brew/Brewfile`
8290

83-
It will also install Nix itself. Nix doesn't like to be installed multiple times - you can avoid this step with:
91+
### mise
8492

85-
```shell-session
86-
$ make nix-pkgs -o setup-nix
87-
```
93+
mise is used for managing programming language runtime versions (Python, Node.js, Go, etc.). It's automatically installed via the Brewfile and activated in Zsh via an `eval`.
8894

8995
### Neovim
9096

brew/Brewfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
tap "hudochenkov/sshpass"
2+
tap "koekeishiya/formulae"
3+
tap "nikitabobko/tap"
4+
5+
# Core tools
6+
brew "bash"
7+
brew "git"
8+
brew "neovim"
9+
brew "tmux"
10+
brew "zsh"
11+
12+
# GNU utils
13+
brew "coreutils"
14+
brew "findutils"
15+
brew "grep"
16+
brew "gnu-sed"
17+
brew "make"
18+
19+
# Shell & terminal
20+
brew "bat"
21+
brew "direnv"
22+
brew "mise"
23+
brew "fd"
24+
brew "fzf"
25+
brew "htop"
26+
brew "jq"
27+
brew "lsd"
28+
brew "ripgrep"
29+
brew "starship"
30+
brew "tig"
31+
brew "tree"
32+
brew "wget"
33+
brew "zoxide"
34+
35+
# Language servers & linters
36+
brew "actionlint"
37+
brew "codespell"
38+
brew "efm-langserver"
39+
brew "golangci-lint"
40+
brew "gopls"
41+
brew "hadolint"
42+
brew "jsonlint"
43+
brew "ltex-ls"
44+
brew "lua-language-server"
45+
brew "marksman"
46+
brew "shellcheck"
47+
brew "shellharden"
48+
brew "sql-language-server"
49+
brew "stylua"
50+
brew "tailwindcss-language-server"
51+
brew "vale"
52+
brew "yamllint"
53+
54+
# Dev tools
55+
brew "cmake"
56+
# brew "deno"
57+
brew "difftastic"
58+
brew "entr"
59+
brew "gh"
60+
brew "just"
61+
brew "lazydocker"
62+
brew "lazygit"
63+
brew "llvm"
64+
brew "stow"
65+
66+
# Build deps & libs
67+
brew "bzip2"
68+
brew "cairo"
69+
brew "gtk4"
70+
brew "libffi"
71+
brew "open-mpi"
72+
brew "openjdk@17"
73+
brew "pango"
74+
brew "pkgconf"
75+
brew "swig"
76+
brew "xz"
77+
brew "zlib"
78+
79+
# Apps & utilities
80+
brew "cbonsai"
81+
brew "csvlens"
82+
brew "duckdb"
83+
brew "ffmpeg"
84+
brew "fish"
85+
brew "flyctl"
86+
brew "glow"
87+
brew "go-task"
88+
brew "httpie"
89+
brew "hugo"
90+
brew "imagemagick"
91+
brew "keychain"
92+
brew "pandoc"
93+
brew "syncthing", restart_service: :changed
94+
brew "weasyprint"
95+
brew "wordnet"
96+
# brew "yarn"
97+
98+
# Taps
99+
brew "hudochenkov/sshpass/sshpass"
100+
brew "koekeishiya/formulae/skhd"
101+
brew "koekeishiya/formulae/yabai"
102+
103+
# Casks
104+
cask "amethyst"
105+
cask "claude-code"
106+
cask "darktable"
107+
cask "dockdoor"
108+
cask "font-fira-code-nerd-font"
109+
cask "font-hack-nerd-font"
110+
cask "mactex"
111+
112+
brew "markdownlint-cli"
113+
cask "copilot-cli"

dotfiles/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ temp
3838
temp.*
3939
temp
4040
.databricks
41-
.venv
41+
**/.mypy_cache

dotfiles/common/.zshenv

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
bash $HOME/dotfiles/scripts/trace.sh "$0"
2-
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
3-
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
4-
fi
2+
# if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
3+
# . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
4+
# fi
5+
# Moved mise activation to .zshrc for interactive shells only (performance optimization)
56
export EDITOR=$(which nvim)
67
export XDG_CONFIG_HOME=$HOME/dotfiles
78
if command -v launchctl >/dev/null 2>&1; then

dotfiles/common/.zshrc

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ atuin_init() {
5454

5555
fpath=($HOME/dotfiles/zsh/custom-autocomplete/ $fpath)
5656
autoload -U compinit
57-
compinit
57+
# Use cached completion dump for faster loading (skip security check)
58+
compinit -C
5859
autoload -Uz $HOME/dotfiles/zsh/custom-autocomplete/todo
5960

6061
export HISTFILE=~/.zsh_history
@@ -70,17 +71,41 @@ source ~/dotfiles/macos/pyenv-flags
7071
export IPYTHONDIR="$HOME/dotfiles/.ipython"
7172

7273
# need a fancy npm setup when npm manages nix - requires a .npmrc with a prefix
73-
export PATH=~/.npm-packages/bin:$PATH
74-
export NODE_PATH=~/.npm-packages/lib/node_modules
75-
export PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
74+
# export PATH=~/.npm-packages/bin:$PATH
75+
# export NODE_PATH=~/.npm-packages/lib/node_modules
76+
# export PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
7677

7778
pyenv_init
7879
starship_init
7980
flyctl_init
8081

81-
eval "$(zoxide init zsh)"
82+
# Lazy-load mise for faster startup (only initialize on first use)
83+
mise() {
84+
unfunction mise
85+
eval "$(command mise activate zsh)"
86+
mise "$@"
87+
}
88+
89+
# Lazy-load zoxide (only initialize on first use of z/zi commands)
90+
z() {
91+
unfunction z zi 2>/dev/null
92+
eval "$(zoxide init zsh)"
93+
z "$@"
94+
}
95+
zi() {
96+
unfunction z zi 2>/dev/null
97+
eval "$(zoxide init zsh)"
98+
zi "$@"
99+
}
100+
82101
eval "$(ssh-agent)" &>/dev/null &>/dev/null
83-
eval "$(direnv hook zsh)"
102+
103+
# Lazy-load direnv (only initialize on first cd)
104+
direnv() {
105+
unfunction direnv
106+
eval "$(command direnv hook zsh)"
107+
direnv "$@"
108+
}
84109

85110
# done twice for a reason
86111
pretzo_init

dotfiles/common/setup-path.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export PATH="$HOME/dotfiles/scripts:$PATH"
55
export PATH="$HOME/personal/area/scripts:$PATH"
66
export PATH="$HOME/go/bin:$PATH"
77
export PATH="$HOME/.local/bin:$PATH"
8+
export PATH="$HOME/.npm-packages/bin:$PATH"
89
export GOPATH="$HOME/go"

0 commit comments

Comments
 (0)