git clone --depth 1 https://github.com/levontumanyan/home_directory
./install.shTest install.sh in a clean Linux environment using the devcontainer image (requires Apple's native container tool):
container run --rm -it \
-v ~/repos/home_directory:/workspaces/home_directory \
-w /workspaces/home_directory \
dotfiles-test \
zsh--rm destroys the container on exit so each run starts from a clean slate. Once inside:
./install.shTo rebuild the image after changing .devcontainer/Containerfile or .devcontainer/devcontainer.json, run make build-test.
After installing new packages on a machine, snapshot the current state back into the repo so other machines stay in sync.
Work machine:
brew bundle dump --force --file=brewfile_workPersonal machine:
brew bundle dump --force --file=brewfile_personalThen commit and push. The dump overwrites the file with everything currently installed via Homebrew — formulas, casks, taps, and VS Code extensions.
Note:
brew bundle dumpoutputs everything flat. Casks and macOS-only formulas will be included without any Linux guards — that's expected, the Brewfiles are macOS-first.
Manually make sure that iterm looks at this dir for its settings: ~/.config/iterm
Symlinks are managed with GNU Stow. Stow mirrors a package directory tree into a target ($HOME), creating one symlink per file. It errors out rather than silently overwriting real files, and -D cleanly reverses everything.
dotfiles/
base/ # stowed on all machines
os/darwin/ # stowed on macOS only
os/linux/ # stowed on Linux only
profile/work/ # stowed on work machines
profile/personal/ # stowed on personal machines
Each package mirrors the layout of $HOME. For example:
dotfiles/base/.zshrc→~/.zshrcdotfiles/os/darwin/.config/iterm/com.googlecode.iterm2.plist→~/.config/iterm/com.googlecode.iterm2.plistdotfiles/profile/work/.work.zsh→~/.work.zsh
- Create the file at the mirrored path inside
dotfiles/base/:~/.config/foo/bar.conf→dotfiles/base/.config/foo/bar.conf
- Re-run
install.sh, or restow manually:stow --dir="$DOTFILES_DIR/dotfiles" --target="$HOME" --restow base
- Commit and push.
For work-only files, use dotfiles/profile/work/ instead.
- Delete the file from the appropriate layer (
dotfiles/base/,dotfiles/os/<platform>/, ordotfiles/profile/<type>/). - Restow to clean up the orphaned symlink:
stow --dir="$DOTFILES_DIR/dotfiles" --target="$HOME" --restow base
- Commit and push.
Proposed fixes
- setup_envs.sh: Remove the broken BACKUP_FILES (already covered by the explicit loop in install.sh)
- install.sh: Save the backup path to ~/.dotfiles_last_backup after backing up
- uninstall.sh: Read ~/.dotfiles_last_backup to find the correct backup dir to restore from
Todo:
- restoring from backups is broken
- create
.claude/settings.json- add skills
gh issue view*safe to run
- make sure there is an option to run the script completely uninteractively for testing/debugging
- better ps1(include git branching, and kubecontext)
- move k8s functions to it's own thing. Follow Stick convention for this!
- idempotency is kinda broken
- fzf everything - what does that even mean. not just history?
- ownership of the files in this repo (root?)
- add history settings
- put buckups in one dir...clean up backup files after 3 iterations
sudo rsync -a --progress --exclude=".local/" --exclude=".vscode-remote/" "$HOME/" "./backup/"-
-
-
-
- /Users/levontumanyan/home_directory/brew_cron.sh >> /tmp/brew_cron.log 2>&1
-
-
-
Macos install stuff requires sudo!
Homebrew not found, installing... - after this line you will need your sudo password to install brew!
git config --global user.signingkey <YOUR_SIGNING_SUBKEY_ID>
git config --global commit.gpgsign true
git config --global tag.gpgsign true\n- [ ] TODO: Migrate ~/.gitconfig to dotfiles/base/ and verify GPG keys before removing HOME .git