Skip to content

Instantly share code, notes, and snippets.

@LiberQuack
Last active April 11, 2023 22:53
Show Gist options
  • Save LiberQuack/c0f51ab60e6cf312aa5da124028c1a22 to your computer and use it in GitHub Desktop.
Save LiberQuack/c0f51ab60e6cf312aa5da124028c1a22 to your computer and use it in GitHub Desktop.
###########################
### Common Applications ###
###########################

#Basic
sudo pacman -Sy flatpak appimagelauncher &&
flatpak install com.github.tchx84.Flatseal
## If exists pulseaudio
sudo pacman -Rdd pulseaudio pulseaudio-bluetooth pulseaudio-qt pulseaudio-alsa pulseaudio-ctl pulseaudio-zeroconf
## If distro manjaro
sudo pacman -Rdd manjaro-pulseaudio
sudo pacman -S manjaro-pipewire
## Normal flow
sudo pacman -S pipewire-pulse pipewire
systemctl --user restart pipewire pipewire-media-session pipewire-pulse

#Sessions
yay -S gamescope-session-git
yay -S plasma-wayland-session

#Waydroid - Only works on wayland
yay -S waydroid &&
sudo systemctl enable waydroid-container.service &&
sudo systemctl start waydroid-container.service &&
echo 'ANDROID_RUNTIME_ROOT=/apex/com.android.runtime sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"' | sudo waydroid shell

#Office
flatpak install flathub org.telegram.desktop &&
flatpak install flathub com.transmissionbt.Transmission &&
flatpak install flathub org.blender.Blender &&
flatpak install flathub org.gnome.Solanum &&
flatpak install flathub com.github.devalien.workspaces &&
flatpak install flathub com.spotify.Client &&
flatpak install flathub de.haeckerfelix.AudioSharing
flatpak install flathub io.github.seadve.Kooha
ysy -S authy
yay -S windscribe-git
yay -S onlyoffice-bin noisetorch
yay -S flameshot
yay -S telegram-desktop-bin 
yay -S whatsapp-for-linux
yay -S kwin-bismuth

#Nvidia (if needed)
sudo pacman -Sv linux linux-headers linux-zen-headers linux-zen nvidia nvidia-utils nvidia-settings opencl-nvidia nvidia-dkms
cat <<EOF | sudo tee /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
EOF
sudo mkinitcpio -P
sudo reboot

#Gaming
#Share partition https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows)
#Disable windows fast book https://www.passfab.com/windows-10/disable-fast-boot-windows-10.html#way3
yay -S steam &&
yay -S gamemode &&
yay -S gamescope mangohud mangoapp &&
yay -S heroic-games-launcher-bin
flatpak install flathub com.valvesoftware.Steam &&
flatpak install flathub net.pcsx2.PCSX2 &&
flatpak install flathub com.usebottles.bottles &&
flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud &&
flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam

#Browsers
yay -S google-chrome
yay -S firefox
yay -S torbrowser-launcher

#Development
git config --global format.pretty "%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)" --replace-all &&
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash &&

git clone https://github.com/syndbg/goenv.git ~/.goenv && 
cat <<'EOF' >> ~/.bashrc
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
EOF
source ~/.bashrc

pip install bzt #Taurus automation framework

sudo pacman -S kubectl &&
yay -S wget &&
yay -S htop &&
yay -S p7zip &&
yay -S inetutils &&
yay -S jetbrains-toolbox &&
yay -S ventoy &&
yay -S android-sdk-platform-tools && sudo ln -srf /opt/android-sdk/platform-tools/adb /usr/bin/adb &&
python -m pip install awscliv2 && echo "alias aws='awsv2'" > ~/.bashrc
curl -fsSL https://get.pulumi.com | sh
flatpak install flathub com.visualstudio.code &&
flatpak install flathub rest.insomnia.Insomnia
curl https://raw.githubusercontent.com/back4app/parse-cli/back4app/installer.sh | sudo /bin/bash &&

#Install mongodb tools - https://www.mongodb.com/try/download/database-tools
mkdir /tmp/mdbt &&
cd /tmp/mdbt &&
wget -O mdbt.tar.gz https://fastdl.mongodb.org/tools/db/mongodb-database-tools-amazon-x86_64-100.7.0.tgz &&
tar -zxvf mdbt.tar.gz &&
sudo mkdir /opt/mongodb-database-tools &&
sudo mv mongodb-database-tools*/bin/* /opt/mongodb-database-tools &&
sudo ln -rvsf /opt/mongodb-database-tools/* /usr/bin

## Docker
sudo pacman -S docker docker-compose &&
sudo usermod -aG docker $USER &&
sudo systemctl enable docker.service &&
sudo systemctl start docker.service &&
sudo wget -O /usr/local/bin/rdocker https://github.com/dvddarias/rdocker/raw/master/rdocker.sh &&
sudo chmod +x /usr/local/bin/rdocker &&
yay -S distrobox

## Networking
sudo pacman -S traceroute

## Logitech Manager
yay -S solaar

#DisplayLink (See https://bit.ly/3qyWuzh)
yay -S evdi displaylink &&
sudo systemctl enable displaylink.service &&
cat <<EOF | sudo tee /etc/X11/xorg.conf.d/20-evdi.conf &&
Section "OutputClass"
	Identifier "DisplayLink"
	MatchDriver "evdi"
	Driver "modesetting"
	Option "AccelMethod" "none"
EndSection
EOF
modprobe udl &&
echo udl | sudo tee /etc/modules-load.d/udl.conf

## Emulate drawing tablet with your device (https://github.com/H-M-H/Weylus#linux)
mkdir -p /tmp/weylus && cd /tmp/weylus &&
wget https://github.com/H-M-H/Weylus/releases/download/v0.11.4/linux.zip &&
unzip linux.zip && rm linux.zip &&
sudo rm -rf /opt/weylus &&
cd .. && sudo mv weylus /opt &&
sudo ln -srf /opt/weylus/weylus /usr/bin/weylus &&
sudo ln -srf /opt/weylus/weylus.desktop /usr/share/applications/weylus.desktop &&
sudo groupadd -r uinput &&
sudo usermod -aG uinput $USER &&
echo 'KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/60-weylus.rules &&
sudo udevadm control --reload &&
sudo udevadm trigger

## Gnome shell extensions integration
yay -S chrome-gnome-shell
xdg-open https://chrome.google.com/webstore/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep
xdg-open https://extensions.gnome.org/extension/1319/gsconnect
xdg-open https://extensions.gnome.org/extension/4839/clipboard-history/
#############################
### System configurations ###
#############################

#Auto enable bluetooth during boot
sudo sed -i.$(date '+%F') '/\[Policy\]/a AutoEnable=true' /etc/bluetooth/main.conf

#Enable reverse ssh tunneling
sudo sed -i.$(date '+%F') -E 's/#GatewayPorts.+/GatewayPorts yes/' /etc/ssh/sshd_config
sudo systemctl restart ssh

#Enable user to lock memory (Solves error on RPCS3)
cat <<EOF | sudo tee -a /etc/security/limits.conf &&
* hard memlock unlimited
* soft memlock unlimited
EOF
sudo sed -i.original-memlock -E 's/(.*memlock.*)//g' /etc/security/limits.d/*
###################################
### Basic install (archinstall) ###
###################################

#Install linux headers (used to bridge drivers like nvidia)
sudo pacman -Sy linux linux-zen linux-headers linux-zen-headers

#Enable multilib repo
#TODO: Detect if its run
cat <<EOF | sudo tee -a /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF

#Yay (Pacman helper)
sudo pacman -Sy --needed git base-devel &&
git clone https://aur.archlinux.org/yay.git &&
cd yay &&
makepkg -si

#Snapper (manager btrfs snapshots)
yay -Sy snapper
sudo snapper --no-dbus -c root create-config / #Make snapshot config for root
sudo snapper --no-dbus list
sudo snapper --no-dbus -c root create --description "First snapshot (multilib/yay)"


###################################################################
### Install desktop environment pantheon (Same from elementary) ###
###################################################################

#Sound packages
yay -S pipewire pipewire-pulse sof-firmware and alsa-ucm-conf

#Restart pipewire if it stop working
systemctl --user restart pipewire pipewire-media-session pipewire-pulse

#Prevents sound card from sleeping (after sleeping sound stop working)
echo options snd_hda_intel power_save=0 | sudo tee -a /etc/modprobe.d/audio_disable_powersave.conf

cat <<'EOF' | sudo tee -a /etc/pacman.conf
[extra-alucryd]
Server = https://pkgbuild.com/~alucryd/$repo/$arch
EOF

yay -Sy pantheon &&
yay -S pantheon-unstable #Has only package switchboard-plug-desktop

sudo perl -i.old -pe "s/OnlyShowIn.*/OnlyShowIn=Unity;GNOME;Pantheon;/" /etc/xdg/autostart/io.elementary.wingpanel.desktop

yay -S pantheon-screencast &&
yay -S switchboard-plug-pantheon-tweaks-git &&
yay -S file-roller-pantheon &&
yay -S pantheon-print &&
yay -S pantheon-dock-git

#After install it`s needed to change fonts in tweaks
yay -S ttf-droid &&
yay -S ttf-opensans &&
yay -S ttf-roboto

#Stop disabling user password after incorrect attempts
echo deny = 0 | sudo tee -a /etc/security/faillock.conf

LIGHTDM_CFG=$(sed "/\[Seat:\*\]/a greeter-session = io.elementary.greeter" /etc/lightdm/lightdm.conf)
sudo mv /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old
echo "$LIGHTDM_CFG" | sudo tee /etc/lightdm/lightdm.conf
sudo systemctl enable lightdm
sudo systemctl enable bluetooth
sudo systemctl enable NetworkManager

#TODO: Edit keys for setting: system fonts managment | one click select folder | wallpaper
#gsettings set ... ... ...

sudo systemctl start lightdm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment