Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Script tested on Debian 12 (bookworm)
- # Install date
- date +"%A, %d %B %Y %I:%M:%S %P" > ._installed_at && chmod 440 ._installed_at
- # Passwordless
- sudo -u root -H sh -c "echo '$USER ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/$USER"
- sudo chmod -v 0440 /etc/sudoers.d/"$USER"
- # Apps
- sudo apt update && sudo apt upgrade -y
- apps=(htop curl wget git zsh vim neovim tree nmap tmux jq exa bat fzf fd-find ripgrep \
- btop hstr progress dnsutils lsof ranger sqlite3 figlet nala fail2ban)
- sudo apt install -y ${apps[@]}
- # mise-en-place -- https://mise.jdx.dev/
- curl https://mise.run | sh
- # Packages links
- sudo ln -s /usr/bin/batcat /usr/local/bin/bat
- sudo ln -s /usr/bin/fdfind /usr/local/bin/fd
- # Figlet Fonts
- cd /usr/share/figlet
- sudo wget https://raw.githubusercontent.com/xero/figlet-fonts/master/ANSI%20Shadow.flf
- # CONFIG ZSH (using https://github.com/z-shell/zi)
- # Config files
- curl -s https://pastebin.com/raw/NhJ5TsCj | tr -d "\r" > ~/.bash_aliases
- curl -s https://pastebin.com/raw/9b1TYMZJ | tr -d "\r" > ~/.gitconfig
- curl -s https://pastebin.com/raw/UPsjmrB5 | tr -d "\r" > ~/.tmux.conf
- curl -s https://pastebin.com/raw/95Pm8sXi | tr -d "\r" > ~/.vimrc
- curl -s https://pastebin.com/raw/tqXJqe8N | tr -d "\r" > ~/.zshrc
- . ~/.bash_aliases
- # Use config files in root (Optional)
- ## using cp: sudo cp -v .bash_aliases .bashrc .vimrc /root
- sudo find .bash_aliases .bashrc .vimrc -exec ln -s $PWD/{} /root/{} \;
- # Change default shell to ZSH
- chsh -s $(which zsh)
- # LS_COLORS (Optional) https://raw.githubusercontent.com/trapd00r/LS_COLORS/master/lscolors.sh
- lsfile=$HOME/.local/share/zap/plugins/LS_COLORS/lscolors.sh
- sed -i -s 's/di=38;5;30/di=38;5;33;1/g' $lsfile # Directory (blue 33)
- sed -i -s 's/ex=38;5;208;1/ex=38;5;40/g' $lsfile # Executable (green 40)
- # Change prompt
- PROMPT="PS1='\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\$ '"
- grep -q '^PS1=' .bashrc || echo $PROMPT >> .bashrc
Advertisement
Add Comment
Please, Sign In to add comment