Skip to content

Repository files navigation

vimkim's dotfiles

A reminder of how to set up my dotfiles on a new machine.

Step 1: Install Homebrew

Prerequisite on Ubuntu (e.g. a fresh Docker container) — the Homebrew installer needs curl and git:

sudo apt install curl git

Follow the instructions at https://brew.sh/:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After installing, if you want to use brew one time only (without polluting your rc files), load it into the current shell (Linux):

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"

On macOS, use eval "$(/opt/homebrew/bin/brew shellenv bash)" instead.

Alternative: Nix Package Manager
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)

or,

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --no-daemon

personal choice, especially inside a container

. $HOME/.nix-profile/etc/profile.d/nix.sh

Note: nix-command and flakes are automatically enabled with chezmoi apply.

Step 2: Install zsh, chezmoi, and nushell, then apply dotfiles

brew install zsh chezmoi nushell

Note: the package is nushell, not nu.

Alternative: zsh via system package manager

Arch

sudo pacman -S zsh

RHEL (Fedora, Rocky, CentOS)

sudo dnf install zsh

Ubuntu

sudo apt install zsh
Alternative: chezmoi via Nix
nix --extra-experimental-features nix-command --extra-experimental-features flakes profile install nixpkgs#chezmoi

Then apply:

# github handle after --apply
chezmoi init --apply vimkim

Updating on an existing machine

chezmoi init --apply only clones when the source directory does not exist yet; it does not pull remote updates. To sync a patch made on another machine, either pull-and-apply in one step:

chezmoi update

or, when the machine might have local edits worth checking first:

chezmoi git pull -- --autostash --rebase   # just pull the source repo
chezmoi diff                               # see what apply would change
chezmoi apply                              # apply when happy

Prerequisites for config.nu

None of these are hard requirements — config.nu quietly skips every tool that is not installed. Recommended for the interactive experience (prompt, history, completions; without carapace, Tab-completion for external commands does not work):

brew install starship atuin carapace
Optional tools

Optional tools used by aliases and helper commands (e.g. eza for l, fzf/fd/ripgrep for the pickers, lazygit for lz, delta as the git/lazygit pager):

brew install eza fzf fd ripgrep lazygit delta

Misc dependencies:

brew install mise direnv zoxide fastfetch diffnav gh
Optional Step: Install oh-my-zsh

I now use nushell instead, by the way.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv .zshrc.pre-oh-my-zsh .zshrc
Optional Step: Other nix packages

Only if you installed Nix. This might take some time and disk spaces.

my-nix-install.sh

Step 3: Install nvim dotfiles

cd $HOME/.config
git clone https://github.com/vimkim/nvim

Step 4: X11 Forwarding

sudo dnf install xauth
sudo apt install xauth
sudo pacman -S xorg-xauth
# /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages