dotfiles/justfile
2024-08-13 16:41:38 -04:00

65 lines
2.0 KiB
Makefile

#!/usr/bin/env -S just --justfile
# Naive check if /Users or /home for home.
OS := if "${HOME}" =~ '/U.*' {
"macos"
} else {
if `cat /etc/issue 2>/dev/null || true` =~ "Deb.*" { "debian" } else { "ubuntu" }
}
PWD := `pwd`
USER := "tyrel"
HOME := "/home/tyrel"
pwd:
echo "{{PWD}}"
git-add:
git add .
rust:
curl https://sh.rustup.rs -sSf | sh
pyenv:
sudo curl https://pyenv.run | bash
echo 'export PYENV_ROOT="/home/$USER/.pyenv"' >> /home/$USER/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/$USER/.bashrc
echo 'eval "$(pyenv init -)"' >> /home/$USER/.bashrc
pyenv install 3.12.3
pyenv global 3.12.3
reset-symlinks:
rm /home/{{USER}}/.config/nvim
rm /home/{{USER}}/bin
rm /home/{{USER}}/.gitconfig
rm /home/{{USER}}/.shell_base
rm /home/{{USER}}/.p10k.zsh
rm /home/{{USER}}/.shell_aliases
rm /home/{{USER}}/.shell_funcs
rm /home/{{USER}}/.shell_exports
symlinks:
ln -s {{PWD}}/home/gitconfig /home/{{USER}}/.gitconfig
ln -s {{PWD}}/home/shell_base /home/{{USER}}/.shell_base
ln -s {{PWD}}/home/p10k.zsh /home/{{USER}}/.p10k.zsh
ln -s {{PWD}}/home/shell_aliases /home/{{USER}}/.shell_aliases
ln -s {{PWD}}/home/shell_funcs /home/{{USER}}/.shell_funcs
ln -s {{PWD}}/home/shell_exports /home/{{USER}}/.shell_exports
ln -s {{PWD}}/home/bin /home/{{USER}}
ln -s {{PWD}}/home/config/nvim /home/{{USER}}/.config/
echo "source ~/.shell_base" >> ~/.bashrc
echo "source ~/.shell_base" >> ~/.zshrc
debian: rust pyenv symlinks
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:neovim-ppa/unstable
sudo apt update
sudo apt-get install -y libncurses5-dev neovim
sudo apt-get install -y build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev
sudo apt-get install -y git-lfs
arch: rust pyenv symlinks
sudo pacman -S git git-lfs ctags rofi terminator tint2 tree-sitter unzip cpan base-devel bat exa nitch
ssh-keys:
cat home/ssh/*.pub > ~/.ssh/authorized_keys