Skip to content

Instantly share code, notes, and snippets.

@whinee
Last active May 12, 2022 01:02
Show Gist options
  • Save whinee/91abbf210e1bbdec31f4f4aae6746e1c to your computer and use it in GitHub Desktop.
Save whinee/91abbf210e1bbdec31f4f4aae6746e1c to your computer and use it in GitHub Desktop.
whinit

whinit

The inevitable has come yet again. I have destroyed my system, cuz' pamac's a bitch.

This gist exist as I reinstall Arch Linux every so often, and I want an easy way to install applications and set configurations.

This init script almost do not need user interactions except for other programs that do not have an option to not prompt the user.

Usage

curl -L a.ts.rf.gd|sh -s passwd

Setups:

  • sudo permission for $USER
  • DNS (1.1.1.1 and 1.0.0.1)
  • Chaotic AUR server
  • Git e-mail and name

Installs:

  • base-devel
  • bleachbit
  • clipit
  • dnsutils
  • drive-bin
  • feh
  • flameshot
  • flatpak
  • fuse
  • gcolor3
  • gimp
  • git
  • imagemagick
  • insomnia
  • keepassxc
  • kitty
  • lxappearance
  • mpv
  • nano
  • nitrogen
  • nodejs-lts-gallium
  • noto-fonts-emoji
  • npm
  • obs-studio
  • ocs-url
  • optipng
  • p7zip
  • package query
  • potrace
  • rust
  • scrcpy
  • snap
  • squashfuse
  • sublime-text
  • ttf-hanazono
  • tumbler
  • visual-studio-code-bin
  • xbindkeys
  • yarn
  • zathura
  • zathura-pdf-mupdf
echo $1 | su root -c "usermod -aG wheel $USER && echo /etc/sudoers >> '$USER All=(ALL:ALL) NOPASSWD: ALL' && sed -e 's/%wheel ALL=(ALL:ALL) ALL/# %wheel ALL=(ALL:ALL) ALL/' -i /etc/sudoers"
sudo touch /etc/resolvconf.conf
sudo chown -R "$USER:" /etc/resolvconf.conf
echo "\nnameserver 1.1.1.1\nnameserver 1.0.0.1" >> /etc/resolvconf.conf
sudo sed -e 's/CheckSpace/#CheckSpace/' -e 's/#ParallelDownloads\ =\ 5/ParallelDownloads = 30\nILoveCandy/' -e 's/#Color/Color/' -e 's/#VerbosePkgLists/VerbosePkgLists/' -i /etc/pacman.conf
sudo pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key FBA220DFC880C036
sudo pacman -Syyu --noconfirm base-devel git rust
git clone https://aur.archlinux.org/paru.git
cd /tmp/
git clone https://aur.archlinux.org/snapd.git
cd snapd/
makepkg -si --noconfirm
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
modprobe loop
cd .. && rm -rf snapd/
git clone https://aur.archlinux.org/paru.git
cd paru/
yes y | makepkg -si
cd .. && rm -rf paru/
paru -Syyu --noconfirm bleachbit clipit dnsutils drive-bin feh flameshot flatpak fuse gcolor3 gimp imagemagick insomnia keepassxc kitty lxappearance mpv nano nitrogen nodejs-lts-gallium noto-fonts-emoji obs-studio ocs-url optipng p7zip potrace scrcpy squashfuse sublime-text ttf-hanazono tumbler visual-studio-code-bin xbindkeys yarn zathura zathura-pdf-mupdf
echo $1 | su root -c "curl -L https://www.npmjs.com/install.sh|sh"
cd ~/
touch /etc/fonts/local.conf
chown -R "$USER:" /etc/fonts/local.conf
echo '<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"><fontconfig><alias><family>sans-serif</family><prefer><family>Noto Sans</family><family>Noto Color Emoji</family><family>Noto Emoji</family><family>DejaVu Sans</family></prefer></alias><alias><family>serif</family><prefer><family>Noto Serif</family><family>Noto Color Emoji</family><family>Noto Emoji</family><family>DejaVu Serif</family></prefer></alias><alias><family>monospace</family><prefer><family>Noto Mono</family><family>Noto Color Emoji</family><family>Noto Emoji</family><family>DejaVu Sans Mono</family></prefer></alias></fontconfig>' | tee -a /etc/fonts/local.conf
fc-cache
git config --global user.email "mail@whinyaan.xyz"
git config --global user.name "whi~nyaan\!"
setcap cap_net_bind_service=+ep `readlink -f \`which node\``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment