(Outdated: I use micromamba now, and keep my softwares in an environment named sw
, not touching base
.)
Steps to terraform a new machine, mostly for personal reference:
-
Change to home directory:
cd ~
-
Install dotfiles:
git clone https://github.com/rishabh-ranjan/dotfiles cp -r dotfiles/* dotfiles/.* .
Errors like these are acceptable:
cp: '/home/rishabhr/dotfiles/..' and '/home/rishabhr' are the same file cp: cannot create regular file '/home/rishabhr/.git/objects/pack/pack-c20af10d644dc847dce7d997b0fbaedcfaf40108.pack': Permission denied cp: cannot create regular file '/home/rishabhr/.git/objects/pack/pack-c20af10d644dc847dce7d997b0fbaedcfaf40108.idx': Permission denied
-
Install mambaforge:
aria2c https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh # for linux chmod +x Mambaforge-Linux-x86_64.sh echo -e "\nyes\n~/.mambaforge\nno" | ./Mambaforge-Linux-x86_64.sh
Use 'q' to exit the license.
-
Update the mamba base environment:
mamba env update -f ~/.config/mamba/base.yml --prune
-
At this point, we can ssh into the machine again. As per the message, setup prompt:
fisher install IlanCosman/tide@v5 echo 1 1 3 2 2 1 1 1 y | tide configure > /dev/null
Select
n
inConfigure tide prompt? [Y/n]
. The second line will configure prompt automatically.Login again for the prompt to take effect.
-
Install
neovim
from the Releases page https://github.com/neovim/neovim/releases. [TODO: detailed commands] -
Clean up home directory:
rm -rf .bash_history .bash_logout .bashrc .cache .conda dotfiles Mambaforge-Linux-x86_64.sh ls -a
-
Add ssh-key with:
ssh-copy-id <username>@<hostname>
-
If required, add a custom rc for fish at
~/.config/fish/custom/<name>.fish
and link to it (or one of the existing ones) with:ln -s ~/.config/fish/custom/<name>.fish ~/.config/fish/custom.fish
-
Neovim should install plugins and do other setup automatically on first run:
nvim
Might give error on the first run because
plug.vim
is not recognized yet, but simply quitting and rerunningnvim
fixes this. -
Github login:
BROWSER=false gh auth login
Sometimes upgrading
gh
causes trouble. In that case, simply delete thegh auth
lines from~/.gitconfig
. -
Update home directory permissions:
chmod 750 ~
This gives you read-write-execute, group users read-execute, and other users no permissions.