Skip to content

Instantly share code, notes, and snippets.

@ianphil
Last active November 3, 2017 00:24
Show Gist options
  • Save ianphil/68eb7b20ef3421ec1934bb38a41908c6 to your computer and use it in GitHub Desktop.
Save ianphil/68eb7b20ef3421ec1934bb38a41908c6 to your computer and use it in GitHub Desktop.
My Fedora Workstation Setup Script
#!/bin/bash
read -n1 -r -p $'SSH Keys? Press space to continue\n' key
if [ "$key" = '' ]; then
echo $'Continuing...\n'
else
echo $'Exiting...\n'
exit 1
fi
### Setup VS Code Repo ###
rpm --import https://packages.microsoft.com/keys/microsoft.asc
sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
### Install Software ###
dnf check-update
dnf install -y code vim tmux
### Install Chrome ###
curl -fsSL https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm -o chrome.rpm
dnf install -y chrome.rpm
rm chrome.rpm
### Install Spotify ###
curl -fsSL https://negativo17.org/repos/spotify/fedora-25/x86_64/spotify-client-1.0-21.fc25.x86_64.rpm -o spotify-client.rpm
curl -fsSL https://negativo17.org/repos/spotify/fedora-25/x86_64/spotify-ffmpeg-0.10.16-3.fc25.x86_64.rpm -o spotify-ffmpeg.rpm
curl -fsSL https://negativo17.org/repos/spotify/fedora-25/x86_64/spotify-openssl-1.0.0t-4.fc25.x86_64.rpm -o spotify-openssl.rpm
dnf install -y spotify-client.rpm spotify-ffmpeg.rpm spotify-openssl.rpm
rm spotify*
### Set scale for spotify ##
cat > /usr/share/applications/spotify.desktop <<- EOM
[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=spotify --force-device-scale-factor=2 %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;
EOM
### Install Slack ###
curl -fsSL https://downloads.slack-edge.com/linux_releases/slack-2.8.1-0.1.fc21.x86_64.rpm -o slack.rpm
dnf -y install slack.rpm
rm slack.rpm
### Install Docker ###
dnf -y install dnf-plugins-core
dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
dnf -y install docker-ce
systemctl start docker
systemctl enable docker
usermod -aG docker $(whoami)
### Setup Azure Cli ###
dnf install -y gcc libffi-devel python-devel openssl-devel
rpm --import https://packages.microsoft.com/keys/microsoft.asc
sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
dnf check-update
dnf install -y azure-cli
### Setup Pres folder ###
mkdir ~/pres
curl -fsSL https://raw.githubusercontent.com/tripdubroot/scripts/master/bash/create_pres.sh -o ~/pres/create_pres.sh
curl -fsSL https://raw.githubusercontent.com/tripdubroot/scripts/master/bash/debug_pres.sh -o ~/pres/debug_pres.sh
curl -fsSL https://raw.githubusercontent.com/tripdubroot/scripts/master/bash/local_pres.sh -o ~/pres/local_pres.sh
curl -fsSL https://raw.githubusercontent.com/tripdubroot/scripts/master/bash/publish_pres.sh -o ~/pres/publish_pres.sh
chmod +x ~/pres/*_pres.sh
git clone git@github.com:TDRTalks/emerging-technologies.git ~/pres/emerging-technologies
git clone git@github.com:TDRTalks/devops.git ~/pres/devops
git clone git@github.com:TDRTalks/node-microservices.git ~/pres/node-microservices
git clone git@github.com:TDRTalks/python-ai-containers.git ~/pres/python-ai-containers
### Dotfiles setup ###
curl -fsSL https://raw.githubusercontent.com/tripdubroot/dotfiles/master/.bashrc -o ~/.bashrc
curl -fsSL https://raw.githubusercontent.com/tripdubroot/dotfiles/master/.tmux.conf -o ~/.tmux.conf
curl -fsSL https://raw.githubusercontent.com/tripdubroot/dotfiles/master/.vimrc -o ~/.vimrc
### Bash git prompt setup ###
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
### Setup ctags for vscode/python ###
dnf install -y ctags
### Install VPN ###
wget https://www.privateinternetaccess.com/installer/pia-nm.sh
bash pia-nm.sh
rm pia-nm.sh
### Install Gnome-Shell-Ex Host Connector ###
dnf install -y chrome-gnome-shell
### Install node ###
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
dnf install -y nodejs
### Set Interface scale factor ###
gsettings set org.gnome.desktop.interface text-scaling-factor 0.75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment