Added linux init script

This commit is contained in:
zebra 2024-07-24 12:09:09 -07:00
parent 82889a7f15
commit 05fe53a43d
3 changed files with 60 additions and 0 deletions

15
config-files/config.fish Normal file
View File

@ -0,0 +1,15 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
set -U fish_greeting ""
source ~/.asdf/asdf.fish
# pyenv init
if command -v pyenv 1>/dev/null 2>&1
pyenv init - | source
end
starship init fish | source
neofetch

View File

@ -0,0 +1,7 @@
add_newline=true
[directory]
home_symbol='🐟  ~'
[line_break]
disabled=true
[cmd_duration]
format='[$duration]($style)'

38
izebra-linux-oneshot.sh Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
#Linux Onboarding Oneshot script for izebra networks.
#Installs fish, starship, and sets up some shell tweaks that are nice to have.
#Check script is running as root
if (whoami != root)
then echo "Please run as Root"
exit 1
fi
#define variables
$fishconfig="https://git.izebra.net/izebra_projects/rmm-scripts/raw/branch/main/config-files/config.fish"
$starshipconfig="https://git.izebra.net/izebra_projects/rmm-scripts/raw/branch/main/config-files/starship.toml"
#Check for updates
sudo apt update
#install fish and copy config file to root and all users under /home/
sudo apt install fish -y
wget $fishconfig -P "$HOME/.config/fish/config.fish"
for homedir in /home/*; do
sudo cp $HOME/.config/fish/config.fish "$homedir/.config/fish/config.fish";
done
#install pyenv
curl https://pyenv.run | bash
#Download starship and copy config file to root and all users under /home/
curl -sS https://starship.rs/install.sh | sh
wget $starshipconfig -P "$HOME/.config/starship.toml"
for homedir in /home/*; do
sudo cp $HOME/.config/starship.toml "$homedir/.config/starship.toml";
done
#Change default shell to fish
chsh -s /usr/bin/fish