Skip to content

Commit

Permalink
feat(bootstrap): setup minimal dotfiles in a devcontainer
Browse files Browse the repository at this point in the history
Add a script to setup the dotfiles in a devcontainer in order to have
basic stuff at hand, e.g. shell configuration and Neovim and some other
tools.
  • Loading branch information
mrolli committed Dec 10, 2024
1 parent e122391 commit be6d57f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions setup_devcontainer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# install starship
curl -ss https://starship.rs/install.sh -o install_starship.sh
chmod 755 install_starship.sh
./install_starship.sh -f
rm install_starship.sh

# Setup Neovim from appimage
# see https://github.com/neovim/neovim/blob/master/install.md#install-from-package
sudo rm -rf /squashfs-root
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
sudo mv squashfs-root /
sudo ln -sf /squashfs-root/AppRun /usr/bin/nvim
rm nvim.appimage
ln -sf ~/dotfiles/nvim ~/.config/nvim

# setup symlinks
mkdir -p ~/.{cache,config,local,ssh}
chmod 700 ~/.{cache,config,local,ssh}
for foo in bash editorconfig gh git starship.tom yamllint zsh; do
ln -sf ~/dotfiles/config/${foo} ~/.config/${foo}
done

# Setup zsh
ln -sf ~/dotfiles/config/zsh/zshenv ~/.zshenv

# Setup bash
cat <<EOF >~/.bashrc
source ~/.bash_profile
EOF
ln -sf ~/dotfiles/config/bash/profile ~/.bash_profile

0 comments on commit be6d57f

Please sign in to comment.