scripts

Scripts for general automations
git clone git://git.laack.co/scripts.git
Log | Files | Refs

arch-public-installation.sh (5360B)


      1 #!/bin/bash
      2 # Full arch installer (publicly accessible resources only)
      3 
      4 cd
      5 
      6 sudo pacman -S curl git gnome-keyring gcc make xorg-server libxft libxinerama freetype2 pkgconf ttf-fira-code zoxide fzf openssh less arandr pass pass-otp xclip xorg-xsetroot base-devel i3lock pandoc entr ripgrep wget jq man-db btop tmux rsync cronie mpv podman pavucontrol otf-latin-modern proton-vpn-gtk-app proton-vpn-cli tk brightnessctl zip unzip signal-desktop xorg-xset lynx figlet flameshot feh ffmpeg zathura-pdf-mupdf websocat xorg-xhost yt-dlp qemu-full qbittorrent alsa-utils pipewire-alsa pipewire-pulse sshfs iotop lsof neovim wireshark-qt nmap torbrowser-launcher bandwhich ghidra bind-tools whois dunst thunderbird graphviz restic dictd amfora i2pd wireguard-tools systemd-resolvconf perf valgrind
      7 
      8 # perf and valgrind for performance profiling binaries (useful in go, c, c++)
      9 
     10 # systemd-resolvconf for wireguard
     11 
     12 sudo systemctl enable systemd-resolved
     13 sudo systemctl start systemd-resolved
     14 
     15 # dictd is so useful!!!
     16 
     17 # REMOVED:
     18 # newsboat -- too distracting, I would check it too frequently
     19 
     20 # TODO: Which of this stuff is redundant?
     21 sudo pacman -S texlive-bin texlive-latex texlive-basic texlive-latexrecommended texlive-binextra texlive-latexextra texlive-fontsextra texlive-fontsrecommended
     22 
     23 
     24 sudo usermod -a -G wireshark $USER  # NOTE: Requires logout to be realized. 
     25                                     # This allows the user to run wireshark without root
     26                                     # with interface listening.
     27 
     28 # xorg-xhost for containers to use my x server
     29 
     30 # TODO: Make this script idempotent.
     31 # Websocat is for dev work
     32 
     33 # BLUETOOTH:
     34 # sudo pacman -S bluez bluez-utils
     35 # sudo systemctl enable bluetooth
     36 # sudo systemctl start bluetooth
     37 
     38 # VIDEO/AUDIO CAPTURE:
     39 # sudo pacman -S obs-studio
     40 
     41 # xorg-xset is for disabling screen turning off after inactivity
     42 # it often kicks in and results in my laptop not detecting my monitor again.
     43 #   this is possibly a limitation of using usbc on an older laptop with such a
     44 #   large monitor...
     45 
     46 fc-cache
     47 
     48 # TK is for pyautogui, gui automations.
     49 
     50 # TODO: Is there a programatic way to set up librewolf?
     51 # I installed latinmodern for the LaTeX font LMRoman10 which is what I force sites in to use with librewolf.
     52 # I also force the monospace font to be Fira Code.
     53 # I also use vimium (copying the backup that is in my config directory) and dark reader.
     54 # I then enable the dark theme and set the home page to be blank.
     55 #
     56 # You also **need** to disable push notifications from mozilla because they contact google servers on startup.
     57 # This is simply not acceptable.
     58 # You know what, fuck them. this is not something I am willing to live with.
     59 # Anything beyond this feels like more work than it's worth.
     60 
     61 # Was required for getting my sound working on my xps13, probably not necessary otherwise:
     62 # alsa-utils pipewire-alsa pipewire-pulse
     63 
     64 mkdir gitRepos
     65 cd gitRepos
     66 
     67 # Get all of my public repos, parse the urls for cloning.
     68 REPOS=$(curl -s https://git.laack.co/ | grep -oP '(?<=<a href=")[^/]+(?=/log.html)')
     69 
     70 for REPO in $REPOS; do
     71 	git clone $REPO
     72 done
     73 
     74 
     75 # TODO: Migrate to stagit again
     76 
     77 mv scripts bin
     78 
     79 # INSTALLATION SUCKLESS UTILS
     80 for REPO in dwm dmenu st; do
     81 	cd $REPO
     82 	sudo make install
     83 	cd ..
     84 done
     85 
     86 go install github.com/andrewlaack/usb-ks@64b02669e38c8a1099492523a93b11757e5754d1
     87 sudo install ~/go/bin/usb-ks /usr/local/bin/
     88 
     89 # EXTERNAL REPOS
     90 git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
     91 git clone https://aur.archlinux.org/yay.git
     92 
     93 cd yay
     94 makepkg -si
     95 
     96 rm -rf ~/gitRepos/yay
     97 
     98 # yay -S librewolf-bin --noconfirm
     99 # yay -S lagrange --noconfirm
    100 yay -S gemget --noconfirm
    101 # yay -S mpv-handler --noconfirm
    102 # 
    103 # xdg-mime default mpv-handler.desktop x-scheme-handler/mpv-handler
    104 # xdg-mime default mpv-handler-debug.desktop x-scheme-handler/mpv-handler-debug
    105 
    106 # NOTE: This might not work because of some gpg stuff
    107 # if that's the case, go the to site and create an executable script in /usr/bin to run it
    108 # as far as configuration, I generally set default search engine to brave search and new tab -> blank page
    109 yay -S mullvad-browser-bin --noconfirm
    110 # yay -S vscodium-bin --noconfirm
    111 # they have default data collection
    112 #yay -S netbird --noconfirm
    113 
    114 
    115 
    116 # Questionable.
    117 # I really dislike their defaults (especially w/ tracking stuff)
    118 # that said, it feels faster (blink and all that)
    119 #
    120 # I **ONLY** use this for work and school (compat + persistence reasons)
    121 #
    122 # Everything else should be done with mullvad / tor.
    123 
    124 yay -S brave-bin --noconfirm
    125 
    126 # RELOCATION OF SELECT REPOS
    127 mv ~/gitRepose/nvim ~/gitRepos/dotfiles
    128 
    129 # SETUP SYMLINKS (GITREPOS IS SOURCE OF TRUTH)
    130 ln -s ~/gitRepos/dotfiles ~/.config
    131 ln -s ~/gitRepos/bin ~/bin
    132 
    133 cd
    134 
    135 for FILE in bashrc xinitrc inputrc ; do
    136 	ln -s .config/$FILE .$FILE
    137 done
    138 
    139 
    140 # SERVICES
    141 sudo systemctl enable sshd
    142 sudo systemctl start sshd
    143 sudo systemctl enable cronie
    144 sudo systemctl start cronie
    145 
    146 # TODO: Should I use docker or podman / some other OCI image thing?
    147 # sudo systemctl enable docker
    148 # sudo systemctl start docker
    149 
    150 # DOCKER
    151 # sudo groupadd docker
    152 # sudo usermod -aG docker $USER
    153 # echo "Docker configured to run as your current user. Log out for this to be realized."
    154 
    155 # DONE
    156 echo "Time to open neovim and run :PackerSync a bunch, delete installer.sh, and run the private installer (if applicable)!"