New structure of installing pre-script
This commit is contained in:
parent
04083c1a90
commit
415b7932c5
@ -2,55 +2,109 @@
|
||||
BASE_PACKAGES="kitty-terminfo gpg git curl wget ripgrep fd-find unzip python3-pip htop fzf bat snapd"
|
||||
USER=$(whoami)
|
||||
|
||||
cd ~
|
||||
################################################################################################################################
|
||||
##
|
||||
## Install base packages
|
||||
##
|
||||
################################################################################################################################
|
||||
|
||||
{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.id "fedora")) -}}
|
||||
sudo dnf install $BASE_PACKAGES -y
|
||||
sudo dnf install fish neovim util-linux-user -y
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
{{ if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
sudo dnf install $BASE_PACKAGES util-linux-user -y
|
||||
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
|
||||
sudo snap install jump
|
||||
|
||||
sudo dnf install cargo -y
|
||||
cargo install atuin
|
||||
|
||||
echo "USER: $USER"
|
||||
sudo chsh -s /usr/bin/fish $USER
|
||||
|
||||
{{ end -}}
|
||||
|
||||
{{ if (and (eq .chezmoi.os "linux") (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "ubuntu"))) -}}
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}}
|
||||
sudo apt update
|
||||
sudo apt install $BASE_PACKAGES -y
|
||||
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
|
||||
################################################################################################################################
|
||||
##
|
||||
## Install fish and set it as the default shell
|
||||
##
|
||||
################################################################################################################################
|
||||
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
{{ if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
sudo dnf install fish -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu"-}}
|
||||
|
||||
{{ if eq .chezmoi.osRelease.id "debian" -}}
|
||||
## Install fish repo
|
||||
## Setup fish repo in debian
|
||||
VERS={{ .chezmoi.osRelease.versionID }}
|
||||
echo "deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_$VERS/ /" | sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list
|
||||
curl -fsSL "https://download.opensuse.org/repositories/shells:fish:release:3/Debian_$VERS/Release.key" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg > /dev/null
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .chezmoi.osRelease.id "ubuntu" -}}
|
||||
{{ else -}}
|
||||
## Setup fish repo in ubuntu
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
{{ end -}}
|
||||
|
||||
|
||||
## Update repos with fish repo included and install fish
|
||||
sudo apt update
|
||||
|
||||
## Install fish
|
||||
sudo apt install fish -y
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
|
||||
|
||||
## Install neovim
|
||||
sudo snap install nvim --classic
|
||||
|
||||
## install atuin
|
||||
bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
|
||||
|
||||
## install jump
|
||||
sudo snap install jump
|
||||
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
## Install fisher plugin manager for fish, so that we may update in after plugin list sync by chezmoi
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
|
||||
## Change default shell to fish
|
||||
echo "\nChanging shell to fish for user $USER"
|
||||
sudo chsh -s $(which fish) $USER
|
||||
|
||||
|
||||
|
||||
################################################################################################################################
|
||||
##
|
||||
## Install neovim
|
||||
##
|
||||
################################################################################################################################
|
||||
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
{{ if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
sudo dnf install neovim -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu"-}}
|
||||
## Install neovim
|
||||
sudo snap install nvim --classic
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################################################################
|
||||
##
|
||||
## Install jump
|
||||
##
|
||||
################################################################################################################################
|
||||
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
sudo snap install jump
|
||||
{{ end -}}
|
||||
|
||||
|
||||
################################################################################################################################
|
||||
##
|
||||
## Install atuin
|
||||
##
|
||||
################################################################################################################################
|
||||
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
{{ if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
## install atuin with cargo
|
||||
sudo dnf install cargo -y
|
||||
cargo install atuin
|
||||
|
||||
{{ else -}}
|
||||
## install atuin with default install script
|
||||
bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
|
||||
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user