Last active
September 21, 2020 10:49
-
-
Save pojntfx/91a303b9df92793b96ae15ab61e872d1 to your computer and use it in GitHub Desktop.
Fedora 31 Development Overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Configure `hostname` | |
echo "[INFO] Processing \`hostname\` ..." | |
sudo hostnamectl set-hostname server-`cat /etc/machine-id` | |
# Install updates | |
echo "[INFO] Processing updates ..." | |
sudo dnf update -y | |
# Install packages | |
echo "[INFO] Processing packages ..." | |
sudo dnf install -y zsh tmux htop sshuttle neovim the_silver_searcher grubby moby-engine @development-tools go npm ruby ruby-devel protobuf-compiler util-linux-user git dnf-automatic firewalld | |
sudo npm i -g yarn prettier @prettier/plugin-ruby typescript tslint vscode-json-languageservice typescript-styled-plugin vscode-html-languageservice vscode-css-languageservice emmet yaml-language-server dockerfile-language-server-nodejs vim-language-server markdownlint bash-language-server | |
GO111MODULE=on go get golang.org/x/tools/gopls@latest | |
sudo gem install solargraph yard | |
yard config --gem-install-yri | |
pip3 install grip --user | |
sudo dnf groupinstall -y "Container Management" "Domain Membership" "Headless Management" | |
sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-31.noarch.rpm | |
sudo dnf install -y ffmpeg ffmpeg-libs | |
curl -L https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl >./kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
curl -L https://github.com/derailed/k9s/releases/download/0.9.3/k9s_0.9.3_Linux_x86_64.tar.gz | tar -zvxf - k9s -O >./k9s | |
chmod +x ./k9s | |
sudo mv ./k9s /usr/local/bin/k9s | |
curl -L https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -zvxf - linux-amd64/helm -O >./helm | |
chmod +x ./helm | |
sudo mv ./helm /usr/local/bin/helm | |
curl -L https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 >./skaffold | |
chmod +x ./skaffold | |
sudo mv ./skaffold /usr/local/bin/skaffold | |
curl -L https://github.com/rancher/k3d/releases/download/v1.3.4/k3d-linux-amd64 >./k3d | |
chmod +x ./k3d | |
sudo mv ./k3d /usr/local/bin/k3d | |
# Configure `dnf-automatic` | |
echo "[INFO] Processing \`dnf-automatic\` ..." | |
sudo systemctl enable dnf-automatic.timer --now | |
# Set shell to `zsh` | |
echo "[INFO] Processing \`zsh\` ..." | |
sudo chsh -s /bin/zsh $USER | |
curl -L https://gist.githubusercontent.com/pojntfx/bd5b52498097fa5c73b6f2dd68fd151c/raw/b6b7cb666d8fa764dac4b1d49fb2cca3eaa7a84e/.zshrc > ~/.zshrc | |
curl -L https://gist.githubusercontent.com/pojntfx/bd5b52498097fa5c73b6f2dd68fd151c/raw/43b717b0a07756a0a347e54ad01d2a88f391e128/.zprofile > ~/.zprofile | |
# Configure `tmux` | |
echo "[INFO] Processing \`tmux\` ..." | |
curl -L https://gist.githubusercontent.com/pojntfx/87a6d903841957adc8d23e508870ddac/raw/fbf03c476781b982093a69a6cda39f3bbc49f60a/.tmux.conf > ~/.tmux.conf | |
# Configure `git` | |
echo "[INFO] Processing \`git\` ..." | |
git config --global user.name "Felix Pojtinger" | |
git config --global user.email "felix@pojtinger.com" | |
# Configure `neovim` | |
echo "[INFO] Processing \`neovim\` ..." | |
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
mkdir -p ~/.config/nvim | |
curl -L https://gist.githubusercontent.com/pojntfx/6f0fa61301399b387294894bdb1f9922/raw/f68472317f90998aa45bc4ce0fe4aa4eb74cd95b/init.vim > ~/.config/nvim/init.vim | |
nvim --headless '+PlugInstall|qa' | |
export CURRENT_DIR="$PWD" | |
cd ~/.config/coc/extensions; yarn add coc-go coc-solargraph coc-tsserver coc-styled-components coc-tslint-plugin coc-json coc-html coc-css coc-emmet coc-yaml coc-zi coc-docker coc-vimlsp coc-markdownlint coc-sh; cd "$CURRENT_DIR" | |
curl -L https://gist.githubusercontent.com/pojntfx/49f2ae0e4a6a012effbbbcf24a632e15/raw/489e7586a0c714d58b3a2e6e55bd9e026505fc3d/coc-settings.json > ~/.config/nvim/coc-settings.json | |
# Configure `moby-engine` | |
echo "[INFO] Processing \`moby-engine\` ..." | |
sudo grubby --update-kernel=ALL --args=systemd.unified_cgroup_hierarchy=0 | |
sudo systemctl enable docker --now | |
sudo usermod -aG docker `whoami` | |
# Configure `cockpit` | |
echo "[INFO] Processing \`cockpit\` ..." | |
sudo systemctl enable --now firewalld | |
sudo systemctl enable --now cockpit.socket | |
sudo firewall-cmd --add-service=cockpit --permanent | |
sudo firewall-cmd --reload | |
# Configure `ssh` | |
echo "[INFO] Processing \`ssh\` ..." | |
mkdir -p ~/.ssh | |
curl -L https://github.com/pojntfx.keys >> ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_keys | |
# Configure `home` | |
echo "[INFO] Processing \`home\` ..." | |
printf "go\nbin\ndoc\n" > ~/.hidden | |
# Send positive message to user | |
echo "[INFO] Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Configure `hostname` | |
echo "[INFO] Processing \`hostname\` ..." | |
sudo hostnamectl set-hostname workstation-`cat /etc/machine-id` | |
# Install updates | |
echo "[INFO] Processing updates ..." | |
sudo dnf update -y | |
# Install packages | |
echo "[INFO] Processing packages ..." | |
sudo dnf install -y zsh tmux htop sshuttle neovim the_silver_searcher grubby moby-engine @development-tools go npm ruby ruby-devel protobuf-compiler util-linux-user gnome-tweaks libgnome-keyring nextcloud-client tilix | |
sudo npm i -g yarn prettier @prettier/plugin-ruby typescript tslint vscode-json-languageservice typescript-styled-plugin vscode-html-languageservice vscode-css-languageservice emmet yaml-language-server dockerfile-language-server-nodejs vim-language-server markdownlint bash-language-server | |
GO111MODULE=on go get golang.org/x/tools/gopls@latest | |
sudo gem install solargraph yard | |
yard config --gem-install-yri | |
pip3 install grip --user | |
sudo dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-31.noarch.rpm | |
sudo dnf install -y ffmpeg ffmpeg-libs | |
curl -L https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl >./kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
curl -L https://github.com/derailed/k9s/releases/download/0.9.3/k9s_0.9.3_Linux_x86_64.tar.gz | tar -zvxf - k9s -O >./k9s | |
chmod +x ./k9s | |
sudo mv ./k9s /usr/local/bin/k9s | |
curl -L https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -zvxf - linux-amd64/helm -O >./helm | |
chmod +x ./helm | |
sudo mv ./helm /usr/local/bin/helm | |
curl -L https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 >./skaffold | |
chmod +x ./skaffold | |
sudo mv ./skaffold /usr/local/bin/skaffold | |
curl -L https://github.com/rancher/k3d/releases/download/v1.3.4/k3d-linux-amd64 >./k3d | |
chmod +x ./k3d | |
sudo mv ./k3d /usr/local/bin/k3d | |
# Set shell to `zsh` | |
echo "[INFO] Processing \`zsh\` ..." | |
sudo chsh -s /bin/zsh $USER | |
curl -L https://gist.githubusercontent.com/pojntfx/bd5b52498097fa5c73b6f2dd68fd151c/raw/b6b7cb666d8fa764dac4b1d49fb2cca3eaa7a84e/.zshrc > ~/.zshrc | |
curl -L https://gist.githubusercontent.com/pojntfx/bd5b52498097fa5c73b6f2dd68fd151c/raw/43b717b0a07756a0a347e54ad01d2a88f391e128/.zprofile > ~/.zprofile | |
# Configure `tmux` | |
echo "[INFO] Processing \`tmux\` ..." | |
curl -L https://gist.githubusercontent.com/pojntfx/87a6d903841957adc8d23e508870ddac/raw/fbf03c476781b982093a69a6cda39f3bbc49f60a/.tmux.conf > ~/.tmux.conf | |
# Configure `git` | |
echo "[INFO] Processing \`git\` ..." | |
git config --global user.name "Felix Pojtinger" | |
git config --global user.email "felix@pojtinger.com" | |
# Configure `gnome-shell` | |
echo "[INFO] Processing \`gnome-shell\` ..." | |
gsettings set org.gnome.desktop.interface enable-animations false | |
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape', 'compose:ralt']" | |
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true | |
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Launch Terminal' | |
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '/usr/bin/tilix' | |
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super>t' | |
gsettings set org.gnome.settings-daemon.plugins.media-keys control-center "['<Super>i']" | |
gsettings set org.gnome.settings-daemon.plugins.media-keys www "['<Super>w']" | |
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']" | |
gsettings set org.gnome.desktop.wm.keybindings close "['<Primary><Shift>q']" | |
gsettings set org.gnome.desktop.wm.keybindings maximize ['<Super>k'] | |
gsettings set org.gnome.desktop.wm.keybindings unmaximize ['<Super>j'] | |
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Primary><Shift><Alt>k'] | |
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Primary><Shift><Alt>j'] | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Primary><Alt>k'] | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Primary><Alt>j'] | |
# Configure `firefox` | |
echo "[INFO] Processing \`firefox\` ..." | |
printf "user_pref('layers.acceleration.force-enabled', true);\nuser_pref('gfx.webrender.enabled', true);\nuser_pref('gfx.webrender.all', true);\nuser_pref('layers.gpu-process.force-enabled', true);\nuser_pref('media.hardware-video-decoding.force-enabled', true);" >> ~/.mozilla/firefox/*.default-release/prefs.js | |
# Configure `neovim` | |
echo "[INFO] Processing \`neovim\` ..." | |
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
mkdir -p ~/.config/nvim | |
curl -L https://gist.githubusercontent.com/pojntfx/6f0fa61301399b387294894bdb1f9922/raw/f68472317f90998aa45bc4ce0fe4aa4eb74cd95b/init.vim > ~/.config/nvim/init.vim | |
nvim --headless '+PlugInstall|qa' | |
export CURRENT_DIR="$PWD" | |
cd ~/.config/coc/extensions; yarn add coc-go coc-solargraph coc-tsserver coc-styled-components coc-tslint-plugin coc-json coc-html coc-css coc-emmet coc-yaml coc-zi coc-docker coc-vimlsp coc-markdownlint coc-sh; cd "$CURRENT_DIR" | |
curl -L https://gist.githubusercontent.com/pojntfx/49f2ae0e4a6a012effbbbcf24a632e15/raw/489e7586a0c714d58b3a2e6e55bd9e026505fc3d/coc-settings.json > ~/.config/nvim/coc-settings.json | |
# Configure `moby-engine` | |
echo "[INFO] Processing \`moby-engine\` ..." | |
sudo grubby --update-kernel=ALL --args=systemd.unified_cgroup_hierarchy=0 | |
sudo systemctl enable docker --now | |
sudo usermod -aG docker `whoami` | |
# Configure `home` | |
echo "[INFO] Processing \`home\` ..." | |
printf "go\nbin\ndoc\n" > ~/.hidden | |
# Send positive message to user and echo info on manual configuration | |
echo "[INFO] Done! Now do the following manually:" | |
echo "- Setup \`tilix\` borderless windows, dark theme, disable terminal bell and don't show the terminal title if it's the only terminal" | |
echo "- Setup \`nextcloud\` login and folder sync" | |
echo "- Setup SSH keys" | |
echo "- Setup \`gnome-shell\` sidebar with \`firefox\`, \`neovim\`, \`nautilus\`, \`tilix\` and \`gnome-software\`" | |
echo "- Setup \`firefox\` login, search engine and extension bar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment