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
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
# Dotfiles

The dotfiles are managed using dotdrop:
https://github.com/deadc0de6/dotdrop
Managed using [dotdrop](https://github.com/deadc0de6/dotdrop).

## Setup on a new machine

```shell
# To setup on clean system:
bash ./install/mac-bootstrap.h
```
bash ./install/mac-bootstrap.sh
```

## Install dotfiles on current machine

```shell
# Dry-run (preview changes without applying)
./dotdrop/dotdrop.sh -c "$PWD/config.yaml" install -p $(hostname) --dry

# Apply
./dotdrop/dotdrop.sh -c "$PWD/config.yaml" install -p $(hostname)
```

> Note: `-c "$PWD/config.yaml"` is required — the dotdrop submodule changes its working
> directory at runtime, so a relative path won't resolve to the repo's config.

## Add a new machine

Add a profile to `config.yaml` using `include` to inherit the base dotfile set:

```yaml
profiles:
Your-Hostname.local:
include:
- Simonass-MacBook-Pro.local
```

Then run the install command above with your hostname.
7 changes: 2 additions & 5 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ config:
showdiff: true
workdir: ~/.config/dotdrop
link_on_import: nolink
instignore:
- '**/.DS_Store'
dotfiles:
f_fzf.zsh:
dst: ~/.fzf.zsh
Expand Down Expand Up @@ -40,9 +42,6 @@ dotfiles:
d_hammerspoon:
src: hammerspoon
dst: ~/.hammerspoon
f_hammerspoon_init.lua:
src: hammerspoon/init.lua
dst: ~/.hammerspoon/init.lua
profiles:
Simonass-Air.lan:
dotfiles:
Expand Down Expand Up @@ -77,5 +76,3 @@ profiles:
RGQQLHCQ5P:
include:
- Simonass-MacBook-Pro.local
dotfiles:
- f_hammerspoon_init.lua
6 changes: 5 additions & 1 deletion dotfiles/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
[user]
email = simonas.rupsys@vinted.com
name = Simonas Rupsys
signingkey = 95DD97499B24AC51
[commit]
gpgSign = true
[filter "lfs"]
process = git-lfs filter-process
required = true
Expand All @@ -13,4 +16,5 @@
[url "git@github.com:"]
insteadOf = git://github.com/
[safe]
directory = /Users/sirup/.goenv
directory = ~/.goenv
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safe.directory expects an absolute path in many Git versions; ~ is not consistently expanded for this setting, which can leave the repo still treated as unsafe. To keep this portable, consider setting this value via an install step that writes the absolute $HOME/.goenv path (e.g., git config --global --add safe.directory ...) or use dotdrop templating to render an absolute path per machine.

Copilot uses AI. Check for mistakes.
directory = /terraform-vault
1 change: 1 addition & 0 deletions dotfiles/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.swp
*.swo
Gemfile.lock
.cursor
6 changes: 4 additions & 2 deletions dotfiles/hammerspoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ local applicationHotkeys = {
o = 'Opera GX',
s = 'Slack',
t = 'Telegram',
v = 'Cursor',
y = 'Signal'
v = 'Visual Studio Code',
r = 'Cursor',
y = 'Signal',
l = 'kitten quick-access-terminal'
}
for key, app in pairs(applicationHotkeys) do
hs.hotkey.bind(hyper, key, function()
Expand Down
73 changes: 29 additions & 44 deletions dotfiles/zshrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# zmodload zsh/zprof

DEFAULT_USER=whoami``

# system detection
function detect_system() {
local _uname_a=$(uname -a)
Expand All @@ -22,6 +20,11 @@ function detect_system() {
}
detect_system

# Ensure TMPDIR is always set correctly on macOS (fixes kitty terminal inheritance)
if [[ "$SYSTEM" == "Darwin" ]]; then
export TMPDIR=$(getconf DARWIN_USER_TEMP_DIR)
fi

#
# https://gist.github.com/ctechols/ca1035271ad134841284
# https://carlosbecker.com/posts/speeding-up-zsh
Expand Down Expand Up @@ -50,7 +53,7 @@ PROMPT=" $PROMPT "
PROMPT='%(?.%F{magenta}.%F{red}❯%F{magenta})❯%f '

# fzf-tab
source ~/git/fzf-tab/fzf-tab.plugin.zsh
[ -f ~/git/fzf-tab/fzf-tab.plugin.zsh ] && source ~/git/fzf-tab/fzf-tab.plugin.zsh

HISTSIZE=10000
SAVEHIST=10000
Expand Down Expand Up @@ -83,10 +86,9 @@ bindkey "^[[1;9D" beginning-of-line
bindkey "^[[1;9C" end-of-line

# Load stuff
source ~/.zsh_env_vars
# source ~/.zsh_terragrunt_vars
[ -f ~/.zsh_env_vars ] && source ~/.zsh_env_vars
source ~/.zsh_git_aliases
source ~/.zsh_vinted_aliases
[ -f ~/.zsh_vinted_aliases ] && source ~/.zsh_vinted_aliases
Comment on lines +89 to +91
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This source is still unconditional. In config.yaml, f_zsh_git_aliases is only installed for some profiles (e.g. Simonass-MacBook-Pro.local) and not for others (e.g. Simonass-Air.lan), so zsh can error on startup. Either guard it with -f like the other source calls, or ensure the dotfile is included in every profile that installs f_zshrc.

Copilot uses AI. Check for mistakes.

# zstyle
# zstyle :prompt:pure:path color default
Expand All @@ -95,10 +97,12 @@ source ~/.zsh_vinted_aliases
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# Alias
alias vi="/opt/homebrew/bin/nvim"
alias sr="ssh -A -o StrictHostKeyChecking=no -l srupsys $@"
alias p2="ping -i0.2 $@"
alias ll="ls -la $@"
alias vi=nvim
function sr() { ssh -A -o StrictHostKeyChecking=no -l srupsys "$@"; }
function sj() { ssh -A -o StrictHostKeyChecking=no -J srupsys@janitor1.ams1.int.vinted.com -l srupsys "$@"; }
alias p2="ping -i0.2"
alias ll="ls -la"
alias make=gmake
alias knife="~/bin/knife"
alias truck='bundle exec foodtruck'
function knaws(){
Expand Down Expand Up @@ -134,23 +138,20 @@ export PATH="$PYENV_ROOT/shims:$PATH"
alias pyinit='eval "$(pyenv init -)"'

# rbenv
export PATH="/Users/simonas.rupsys/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
alias rbinit='eval "$(rbenv init -)"'
# eval "$(rbenv init -)"

# goenv
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
export PATH="$GOENV_ROOT/shims:$GOENV_ROOT/bin:$PATH"
alias goinit='eval "$(goenv init -)"'

# TODO: remove this. 1.1.1q openssl is broken. this is workaround
export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"

# init all envs
alias init='pyinit;rbinit;goinit'
alias initenvs='pyinit;rbinit;goinit'
# uncomment to enable full shell integration (rbenv shell, completions):
# pyinit
rbinit
goinit
# rbinit
# goinit

# You may need to manually set your language environment
# export LANG=en_US.UTF-8
Expand All @@ -162,35 +163,19 @@ else
export EDITOR='nvim'
fi

# Overcommit
check_overcommit() {
if [ -d ".git" ]; then
template="$HOME/.overcommit.yml"
if [ ! -L ".overcommit.yml" ]; then
echo 'Installing .overcommit.yml'
ln -sf "$template" "$(pwd)/.overcommit.yml"
overcommit --install
overcommit --sign
fi
fi
}

# Install .overcommit.yml to git repos
precmd() { # run before each prompt
# check_overcommit
}

#zprof
source "${DEVTOOLS_PATH:-$HOME/vinted/dev-tools}/bin/shell_function.sh"

# tfenv path
# export PATH="$HOME/.tfenv/bin:$PATH"
[ -f "${DEVTOOLS_PATH:-$HOME/vinted/dev-tools}/bin/shell_function.sh" ] && \
source "${DEVTOOLS_PATH:-$HOME/vinted/dev-tools}/bin/shell_function.sh"

export PATH="$HOME/bin:$PATH"

# export TERM=xterm-kitty

eval $(thefuck --alias)
command -v thefuck &>/dev/null && eval "$(thefuck --alias)"

autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /opt/homebrew/bin/nomad nomad
complete -o nospace -C "$(command -v nomad)" nomad

export PATH="$HOME/.local/bin:$PATH"

# opencode
export PATH="$HOME/.opencode/bin:$PATH"
13 changes: 5 additions & 8 deletions install/brew-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/sh

# brew taps
brew tap d12frosted/emacs-plus
set -e

# brew installations
brew install awk
Expand All @@ -20,8 +18,8 @@ brew install shellcheck
brew install imagemagick
brew install openssl
brew install --cask kitty
brew install hammerspoon
brew install karabiner-elements
brew install --cask hammerspoon
brew install --cask karabiner-elements
brew install tree
brew install pyenv

Expand All @@ -30,12 +28,11 @@ $(brew --prefix)/opt/fzf/install --key-bindings --completion --update-rc --no-fi

# nvim
brew install neovim
pip3 install neovim
pip3 install pynvim
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

# Firacode fonts
brew tap homebrew/cask-fonts
brew install --cask font-fira-code
brew install --cask font-fira-code

# MacLaunch
brew install hazcod/homebrew-hazcod/maclaunch
Expand Down
5 changes: 3 additions & 2 deletions install/git-clone-installs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
set -e

sudo chown -R simonas.rupsys ~/.config/
sudo chown -R simonas.rupsys ~/.local/share
sudo chown -R "$USER" ~/.config/
sudo chown -R "$USER" ~/.local/share
Comment on lines +4 to +5
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this script is ever executed under sudo, $USER will typically be root, so these chown calls would incorrectly change ownership to root. Prefer using ${SUDO_USER:-$USER} (or similar) to ensure ownership is set back to the invoking user.

Suggested change
sudo chown -R "$USER" ~/.config/
sudo chown -R "$USER" ~/.local/share
sudo chown -R "${SUDO_USER:-$USER}" ~/.config/
sudo chown -R "${SUDO_USER:-$USER}" ~/.local/share

Copilot uses AI. Check for mistakes.

# Kitty themes
# git clone --depth 1 git@github.com:dexpota/kitty-themes.git ~/.config/kitty/kitty-themes
Expand Down
3 changes: 2 additions & 1 deletion install/mac-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e
# Pasiskolinta is https://github.com/japorized/dotfiles/tree/master/install

# Ensure user has edited config.yaml and the dotfiles for proper installation
Expand All @@ -25,7 +26,7 @@ echo 'Installing xcode cli tools'

echo 'Installing Homebrew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/simonas.rupsys/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME/.zprofile"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This append is not idempotent: re-running the bootstrap will keep adding another identical brew shellenv line to ~/.zprofile. Consider only adding it if it's not already present (e.g., grep check) or using a managed block.

Suggested change
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME/.zprofile"
if ! grep -q 'eval "$(/opt/homebrew/bin/brew shellenv)"' "$HOME/.zprofile" 2>/dev/null; then
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME/.zprofile"
fi

Copilot uses AI. Check for mistakes.
eval "$(/opt/homebrew/bin/brew shellenv)"

echo 'Installing Homebrew packages'
Expand Down