commit
b28f43342e
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Ilya Maximov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,20 @@
|
||||

|
||||
|
||||
# rach lunx
|
||||
The most Arch Linux installer
|
||||
|
||||
## Disclaimer
|
||||
please don't be mad at me if this script deletes something important
|
||||
|
||||
## How
|
||||
1. Boot into the Arch installer image
|
||||
2. `mkcd /tmp/rach`
|
||||
3. `curl overli.st/rach | tar -xz && ./rach.sh <disk>`
|
||||
4. Install your microcode and configure the timezone, locales and the hostname
|
||||
5. Ctrl + D
|
||||
6. `reboot`
|
||||
7. Log in as root with the password `1`
|
||||
8. `/usr/share/rach/rachuser.sh <username>`
|
||||
|
||||
## Why
|
||||
h
|
@ -0,0 +1,2 @@
|
||||
export CUSTOM_YAY="$CUSTOM_YAY
|
||||
extra/mesa extra/amdvlk extra/libva-mesa-driver"
|
@ -0,0 +1,2 @@
|
||||
export CUSTOM_YAY="$CUSTOM_YAY
|
||||
extra/gst-libav extra/ffmpeg"
|
@ -0,0 +1,12 @@
|
||||
export CUSTOM_YAY="$CUSTOM_YAY
|
||||
aur/adwaita-qt
|
||||
extra/gnome-session extra/gdm extra/gnome-control-center
|
||||
extra/xdg-user-dirs-gtk extra/gnome-terminal extra/gnome-software
|
||||
extra/gnome-software-packagekit-plugin extra/gnome-system-monitor
|
||||
extra/gnome-themes-extra extra/gnome-backgrounds extra/qt5-wayland
|
||||
extra/qt6-wayland extra/xorg-xwayland extra/xdg-desktop-portal-gnome
|
||||
extra/tracker extra/cantarell-fonts extra/pipewire extra/pipewire-alsa
|
||||
extra/pipewire-pulse extra/pipewire-jack extra/wireplumber extra/dconf-editor
|
||||
extra/nautilus"
|
||||
|
||||
export CUSTOM_ENABLE=gdm
|
@ -0,0 +1,11 @@
|
||||
export CUSTOM_SHELL=/bin/sh
|
||||
|
||||
export CUSTOM_YAY="$CUSTOM_YAY
|
||||
"
|
||||
|
||||
export CUSTOM_FLATPAK="$CUSTOM_FLATPAK
|
||||
"
|
||||
|
||||
function custom_post() {
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
source .base_gnome.sh
|
||||
source .base_amdgpu.sh
|
||||
source .base_codecs.sh
|
||||
|
||||
export CUSTOM_SHELL=/bin/zsh
|
||||
|
||||
export CUSTOM_YAY="$CUSTOM_YAY
|
||||
aur/vscodium-bin aur/bottles aur/ttf-twemoji
|
||||
community/neovim community/virt-manager community/ttf-dejavu
|
||||
community/ttf-nerd-fonts-symbols community/inter-font community/glfw-wayland
|
||||
commuitty/rustup
|
||||
core/man-pages
|
||||
extra/zsh extra/noto-fonts extra/qemu extra/noto-fonts-cjk
|
||||
multilib/steam"
|
||||
|
||||
export CUSTOM_FLATPAK="$CUSTOM_FLATPAK
|
||||
org.gnome.Weather//stable
|
||||
org.gnome.Epiphany.Devel//
|
||||
org.telegram.desktop//beta
|
||||
com.mattjakeman.ExtensionManager//beta
|
||||
de.haeckerfelix.Fragments//stable"
|
||||
|
||||
function custom_post() {
|
||||
cd /tmp
|
||||
git clone --recurse-submodules https://github.com/overlisted/dotfiles
|
||||
rsync -a dotfiles/files/.* $HOME
|
||||
|
||||
rustup default nightly
|
||||
rustup component add rustfmt
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
# Usage:
|
||||
# rach.sh <disk>
|
||||
# disk - Target disk (/dev/sda)
|
||||
|
||||
set -e
|
||||
|
||||
PKG_KERNEL="linux-zen linux-firmware amd-ucode intel-ucode"
|
||||
PKG_SYSTEM="base dbus-broker flatpak networkmanager ufw flatpak libvirt"
|
||||
PKG_PROGRAMS="opendoas wget curl git nano rsync"
|
||||
PKG_DEVEL="linux-zen-headers base-devel go"
|
||||
|
||||
PACKAGES="$PKG_KERNEL $PKG_SYSTEM $PKG_DEVEL $PKG_PROGRAMS"
|
||||
ENABLE="systemd-resolved systemd-homed \
|
||||
NetworkManager avahi-daemon libvirtd ufw"
|
||||
|
||||
RACH=/usr/share/rach
|
||||
|
||||
if [ $1 = "chrooted" ]; then
|
||||
bootctl install
|
||||
cp $RACH/systemd-boot/loader.conf /boot/loader/
|
||||
cp $RACH/systemd-boot/arch.conf /boot/loader/entries/
|
||||
|
||||
systemctl disable dbus
|
||||
systemctl enable dbus-broker $ENABLE
|
||||
|
||||
ln -sf /usr/bin/doas /usr/bin/sudo
|
||||
echo -e "permit persist setenv { XAUTHORITY LANG LC_ALL } :wheel\n" > /etc/doas.conf
|
||||
chmod 0400 /etc/doas.conf
|
||||
|
||||
echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
|
||||
pacman -Sy
|
||||
|
||||
timedatectl set-ntp true
|
||||
|
||||
usermod --password $(echo 1 | openssl passwd -1 -stdin) root
|
||||
else
|
||||
export EFI_PART=1
|
||||
export ROOT_PART=2
|
||||
|
||||
function fdisk_commands() {
|
||||
echo "g"
|
||||
|
||||
echo "n"
|
||||
echo "$EFI_PART" # part num
|
||||
echo "" # first sector
|
||||
echo "+256M" # last sector
|
||||
|
||||
echo "t"
|
||||
# echo "$EFI_PART" # part num
|
||||
echo "1" # type number
|
||||
|
||||
echo "n"
|
||||
echo "$ROOT_PART" # part num
|
||||
echo "" # first sector
|
||||
echo "" # last sector
|
||||
|
||||
echo "t"
|
||||
echo "$ROOT_PART" # part num
|
||||
echo "23" # type number
|
||||
|
||||
echo "w"
|
||||
}
|
||||
|
||||
fdisk_commands | fdisk -W always $1 # -W gets rid of that annoying y/n prompt
|
||||
|
||||
mkfs.vfat $1$EFI_PART
|
||||
mkfs.ext4 $1$ROOT_PART -L archroot
|
||||
|
||||
mount $1$ROOT_PART /mnt
|
||||
mkdir /mnt/boot
|
||||
mount $1$EFI_PART /mnt/boot
|
||||
|
||||
pacstrap /mnt $PACKAGES
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
|
||||
mv /tmp/rach /mnt/$RACH
|
||||
arch-chroot /mnt $RACH/rach.sh chrooted
|
||||
arch-chroot /mnt # interactive
|
||||
fi
|
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
# Usage:
|
||||
# rachlogin.sh [custom]
|
||||
# custom - Path to the custom config script
|
||||
|
||||
set -e
|
||||
|
||||
RACH=/usr/share/rach
|
||||
|
||||
FLATPAK_REPOS=(
|
||||
"flathub https://flathub.org/repo/flathub.flatpakrepo"
|
||||
"flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo"
|
||||
"gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
||||
"webkit https://software.igalia.com/flatpak-refs/webkit-sdk.flatpakrepo"
|
||||
)
|
||||
|
||||
if [ -z $1 ]; then
|
||||
source $RACH/custom/noop.sh
|
||||
else
|
||||
PATH="$PATH:$RACH/custom" source $RACH/custom/$1
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd yay
|
||||
makepkg -si --noconfirm
|
||||
|
||||
yay --noconfirm -R sudo || sudo rm /usr/bin/sudo
|
||||
yay --noconfirm --sudo doas -S aur/yay aur/opendoas-sudo $CUSTOM_YAY
|
||||
|
||||
for ((i = 0; i < ${#FLATPAK_REPOS[@]}; i++)); do
|
||||
flatpak remote-add --user --if-not-exists $FLATPAK_REPOS[$i]
|
||||
done
|
||||
|
||||
# i don't want any apps accidentally getting installed under root
|
||||
sudo flatpak remote-delete flathub
|
||||
|
||||
for app in $CUSTOM_FLATPAK; do
|
||||
flatpak install --noninteractive --user $app
|
||||
done
|
||||
|
||||
custom_post
|
||||
|
||||
[ -z "$CUSTOM_ENABLE" ] || sudo systemctl enable $CUSTOM_ENABLE
|
||||
|
||||
homectl update $(whoami) --shell=$CUSTOM_SHELL
|
||||
|
||||
sudo reboot now
|
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Usage:
|
||||
# rachuser.sh <username> [custom]
|
||||
# username - Username of the created user
|
||||
# custom - Path to the custom config script
|
||||
|
||||
set -e
|
||||
|
||||
RACH=/usr/share/rach
|
||||
|
||||
passwd -d root
|
||||
mv /home/$1 /home/$1.old && echo "Moved old home"
|
||||
|
||||
homectl create \
|
||||
--storage=directory \
|
||||
--member-of=libvirt \
|
||||
--member-of=wheel \
|
||||
$1
|
||||
|
||||
ufw enable
|
||||
|
||||
# i hate this
|
||||
echo "Please run su $1 and $RACH/rachlogin.sh (optionally with the name of the custom config)"
|
||||
homectl with $1 sh
|
@ -0,0 +1,6 @@
|
||||
title Arch Linux
|
||||
linux /vmlinuz-linux-zen
|
||||
initrd /amd-ucode.img
|
||||
initrd /intel-ucode.img
|
||||
initrd /initramfs-linux-zen.img
|
||||
options root="LABEL=archroot" rw
|
@ -0,0 +1,2 @@
|
||||
default arch.conf
|
||||
timeout 10
|
Loading…
Reference in new issue