Last active
December 9, 2025 10:31
-
-
Save 95gabor/46d28becc44e2aa421f185069748a2b7 to your computer and use it in GitHub Desktop.
UBI9 development environment
This file contains hidden or 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/bash | |
| # Usage: sh -c "$(curl -fsSl https://gist.githubusercontent.com/95gabor/46d28becc44e2aa421f185069748a2b7/raw)" | |
| set -e | |
| microdnf -y update | |
| microdnf -y install \ | |
| vim \ | |
| util-linux-user \ | |
| zsh \ | |
| fzf \ | |
| git-delta | |
| # setup oh my zsh | |
| RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| # setup p10k | |
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" | |
| mkdir -p ~/.local/share/zsh/plugins | |
| ln -s /usr/share/zsh/plugins/powerlevel10k ~/.local/share/zsh/plugins/ | |
| curl https://gist.githubusercontent.com/95gabor/a4bc9c7a090423fb92ce26e4f50a7893/raw/03e7ed5d0ac8df24e03398b5d7b4de6497ed9e5f/.p10k.zsh -L -o ~/.p10k.zsh | |
| # configure zsh-autosuggestions | |
| git clone https://github.com/zsh-users/zsh-autosuggestions \ | |
| ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
| # Syntax highlighting | |
| git clone https://github.com/zsh-users/zsh-syntax-highlighting \ | |
| ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
| # Extra completions | |
| git clone https://github.com/zsh-users/zsh-completions \ | |
| ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions | |
| # configure .zshrc | |
| cat <<'EOF' >> ~/.zshrc | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| # fzf | |
| eval "$(fzf --zsh)" | |
| # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
| [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh | |
| EOF | |
| # configure zsh theme | |
| sed -i 's|^ZSH_THEME=.*|ZSH_THEME="powerlevel10k/powerlevel10k"|g' ~/.zshrc | |
| mkdir -p /workspace/ | |
| git config --global --add safe.directory "/workspace/*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment