first modification

This commit is contained in:
Lukas Graz 2022-04-15 15:15:15 +02:00
parent 96b668a6e5
commit c789d0c6a4
16 changed files with 310 additions and 320 deletions

View File

@ -1,23 +0,0 @@
# Preinstall
Contains the steps necessary to configure and pacstrap the install to selected drive.
# Overview
Creates the btrfs subvolumes.
# Functions
* [mountallsubvol()](#mountallsubvol)
* [subvolumesetup()](#subvolumesetup)
## mountallsubvol()
Mount all btrfs subvolumes after root has been mounted.
## subvolumesetup()
BTRFS subvolulme creation and mounting.

View File

@ -1,8 +0,0 @@
# Setup
Configures installed system, installs base packages, and creates user.
# Functions

View File

@ -1,8 +0,0 @@
# User
User customizations and AUR package installation.
# Functions

View File

@ -1,8 +0,0 @@
# Post-Setup
Finalizing installation configurations and cleaning up after script.
# Functions

View File

@ -1,8 +0,0 @@
# ArchTitus
Entrance script that launches children scripts for each phase of installation.
# Functions

View File

@ -1,98 +0,0 @@
# Startup
This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc.
# Settings
## General Settings
* **CONFIG_FILE** (string)[default: **$CONFIGS_DIR/setup.conf**]: Location of setup.conf to be used by set_option and all subsequent scripts.
# Functions
* [set_option()](#set_option)
* [select_option()](#select_option)
* [logo()](#logo)
* [filesystem()](#filesystem)
* [timezone()](#timezone)
* [keymap()](#keymap)
* [drivessd()](#drivessd)
* [diskpart()](#diskpart)
* [userinfo()](#userinfo)
* [aurhelper()](#aurhelper)
* [desktopenv()](#desktopenv)
* [installtype()](#installtype)
## set_option()
set options in setup.conf
### Output on stdout
* Output routed to startup.log
### Output on stderr
* # @stderror Output routed to startup.log
### Arguments
* **$1** (string): Configuration variable.
### Arguments
* **$2** (string): Configuration value.
## select_option()
Renders a text based list of options that can be selected by the
user using up, down and enter keys and returns the chosen option.
Arguments : list of options, maximum of 256
"opt1" "opt2" ...
Return value: selected index (0 for opt1, 1 for opt2 ...)
## logo()
Displays ArchTitus logo
_Function has no arguments._
## filesystem()
This function will handle file systems. At this movement we are handling only
btrfs and ext4. Others will be added in future.
## timezone()
Detects and sets timezone.
## keymap()
Set user's keyboard mapping.
## drivessd()
Choose whether drive is SSD or not.
## diskpart()
Disk selection for drive to be used with installation.
## userinfo()
Gather username and password to be used for installation.
## aurhelper()
Choose AUR helper.
## desktopenv()
Choose Desktop Environment
## installtype()
Choose whether to do full or minimal installation.

View File

@ -1,8 +1,5 @@
#!/bin/bash #!/bin/bash
#github-action genshdoc #github-action genshdoc
#
# @file ArchTitus
# @brief Entrance script that launches children scripts for each phase of installation.
# Find the name of the folder the scripts are in # Find the name of the folder the scripts are in
set -a set -a

View File

@ -47,9 +47,9 @@ TIMELINE_CLEANUP="yes"
# limits for timeline cleanup # limits for timeline cleanup
TIMELINE_MIN_AGE="1800" TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_HOURLY="3"
TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_DAILY="3"
TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_WEEKLY="3"
TIMELINE_LIMIT_MONTHLY="0" TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0" TIMELINE_LIMIT_YEARLY="0"

147
my_notes.md Normal file
View File

@ -0,0 +1,147 @@
# ArchTitus - my Fork
**Description:** Arch install script
this script is from [GitHub](https://github.com/ChrisTitusTech/ArchTitus) and is modified by me
# To change
## boot
- dual boot for windows (dont delete partition)
- skip boot menu (show if 'shift' pressed down)
- do not use grub-theming
## package-install
- pacman-pkgs.txt
- replace pulseaudio with pipewire
- GPU packages
- check if all nessecary:
libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa
- aur-pkgs.txt
- basically all useless -> substitute with own
- openbox.txt
- gnome.txt
- filter some unnessecary stuff,
- inspect gnome-extras (this is installed if 'FULL')
**Other:**
deepin.txt
awesome.txt
lxde.txt
cinnamon.txt
mate.txt
budgie.txt
kde.txt
xfce.txt
### services
- dont disable dhcpcd.service?
## configs:
- visudo add:
Defaults env_keep +="PYTHONPATH"
Defaults editor=/usr/bin/nano
### Sudo no password
just comment lines in setup.sh?
### US to DE/CH
LOCALE_IDENTIFIER="en_US.UTF-8 UTF-8"
and in `1-setup.sh` set:
`sed -i 's/^#$LOCALE_IDENTIFIER/$LOCALE_IDENTIFIER/' /etc/locale.gen`
### delete zsh
in `2-user.sh`
### turn of terminal bell/beep
## CleanUp
`rm -rf $AUR_HELPER`
---
# Files Structure
## archtitus.sh
**Variables:**
`SCRIPT_DIR`
`SCRIPTS_DIR`
`CONFIGS_DIR`
**Purpose:**
runs all the other scripts
**misc:**
## scripts/startup.sh
**Variables:**
`CONFIG_FILE` = configs/setup.conf
**Purpose:**
define variables (saved to `configs/setup.conf`)
## configs/setup.conf
**Variables:**
`FS` : Filesystem, eg: "btrfs"
`TIMEZONE`
`KEYMAP`
`DISK`
`MOUNT_OPTIONS`="noatime,compress=zstd,ssd,commit=120" #if ssd
`USERNAME`
`PASSWORD`
`NAME_OF_MACHINE` : hostname
`AUR_HELPER` : e.g: "yay"
`DESKTOP_ENV` : e.g: "gnome"
`INSTALL_TYPE` : in {FULL MINIMAL}, determines number of apps added
**Purpose:**
config file
## scripts/0-preinstall.sh
**Variables:**
`iso` =CH
`partition2` & `partition3`
**Purpose:**
- optimize pacman-downloads-install
- whipes **ALL** data/partitions (including Windows) on $DISK and creates new partition table
**misc:**
## scripts/1-setup.sh
**Variables:**
`TOTAL_MEM`
**Purpose:**
- Setup / config:
- Network,
- Mirrors,
- n_cores (for build),
- Parallel Downloads,
- Lang&Locale
- sudo no password
- Installing
- packages from `pkg-files/pacman-pkgs.txt`
- install CPU-packages
- install GPU-packages
- adding user
**misc:**
## scripts/2-user.sh
**Variables:**
**Purpose:**
**misc:**
## scripts/3-post-setup.sh
**Variables:**
**Purpose:**
**misc:**
---
## scripts/kderice-backup.sh
**Variables:**
**Purpose:**
**misc:**
## scripts/kderice-restore.sh
**Variables:**
**Purpose:**
**misc:**

View File

@ -1,22 +1,22 @@
--END OF MINIMAL INSTALL-- --END OF MINIMAL INSTALL--
autojump # autojump
brave-bin # brave-bin
bridge-utils # bridge-utils
dxvk-bin # dxvk-bin
github-desktop-bin # github-desktop-bin
lightly-git # lightly-git
lightlyshaders-git # lightlyshaders-git
mangohud # mangohud
mangohud-common # mangohud-common
nerd-fonts-fira-code # nerd-fonts-fira-code
nordic-darker-standard-buttons-theme # nordic-darker-standard-buttons-theme
nordic-darker-theme # nordic-darker-theme
nordic-kde-git # nordic-kde-git
nordic-theme # nordic-theme
ocs-url # ocs-url
plymouth-git # plymouth-git
sddm-nordic-theme-git # sddm-nordic-theme-git
snapper-gui-git # snapper-gui-git
ttf-meslo # ttf-meslo
vde2 # vde2
zoom zoom

View File

@ -1,3 +1,4 @@
base-devel
mesa mesa
xorg xorg
xorg-server xorg-server
@ -5,7 +6,7 @@ xorg-apps
xorg-drivers xorg-drivers
xorg-xkill xorg-xkill
xorg-xinit xorg-xinit
xterm # xterm
binutils binutils
dosfstools dosfstools
linux-headers linux-headers
@ -13,95 +14,104 @@ noto-fonts-emoji
usbutils usbutils
xdg-user-dirs xdg-user-dirs
--END OF MINIMAL INSTALL-- --END OF MINIMAL INSTALL--
alsa-plugins # alsa-plugins
alsa-utils # alsa-utils
autoconf ## autoconf
automake ## automake
awesome-terminal-fonts # awesome-terminal-fonts
bash-completion # bash-completion
bind # bind
bison ## bison
bluez # bluez
bluez-libs # bluez-libs
bluez-utils # bluez-utils
bridge-utils # bridge-utils
btrfs-progs btrfs-progs
celluloid # celluloid
cmatrix # cmatrix
code code
cronie cronie
cups cups
dialog dialog
dmidecode # dmidecode
dnsmasq # dnsmasq
dtc # dtc
efibootmgr efibootmgr
egl-wayland # egl-wayland
exfat-utils exfat-utils
flex ## flex
fuse2 fuse2
fuse3 fuse3
fuseiso # fuseiso
gamemode # gamemode
gcc ## gcc
gimp # gimp
gparted gparted
gptfdisk gptfdisk
grub-customizer # grub-customizer
gst-libav # gst-libav
gst-plugins-good # gst-plugins-good
gst-plugins-ugly # gst-plugins-ugly
haveged # haveged
htop htop
jdk-openjdk # jdk-openjdk
kitty # kitty
libdvdcss # libdvdcss
libtool ## libtool
lsof # lsof
lutris # lutris
lzop # lzop
m4 ## m4
make ## make
neofetch # neofetch
ntfs-3g ntfs-3g
ntp ntp
openbsd-netcat # openbsd-netcat
openssh openssh
os-prober os-prober
p7zip # p7zip
papirus-icon-theme # papirus-icon-theme
patch ## patch
picom # picom
pkgconf pkgconf
powerline-fonts # powerline-fonts
pulseaudio # pulseaudio
pulseaudio-alsa # pulseaudio-alsa
pulseaudio-bluetooth # pulseaudio-bluetooth
python-notify2 # python-notify2
python-psutil # python-psutil
python-pyqt5 # python-pyqt5
python-pip # python-pip
qemu # qemu
snap-pac # snap-pac
snapper # snapper
steam # steam
swtpm # swtpm
synergy # synergy
terminus-font terminus-font
traceroute # traceroute
ttf-droid # ttf-droid
ttf-hack # ttf-hack
ttf-roboto # ttf-roboto
ufw # ufw
unrar # unrar
unzip # unzip
virt-manager virt-manager
virt-viewer virt-viewer
which ## which
wine-gecko # wine-gecko
wine-mono # wine-mono
winetricks # winetricks
zip zip
zsh # zsh
zsh-syntax-highlighting # zsh-syntax-highlighting
zsh-autosuggestions # zsh-autosuggestions
#
##########################################
### MY PACKAGES
##########################################
gst-plugin-pipewire
pipewire
pipewire-alsa
pipewire-jack
pipewire-pulse

View File

@ -8,9 +8,7 @@
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
#github-action genshdoc #github-action genshdoc
#
# @file Preinstall
# @brief Contains the steps necessary to configure and pacstrap the install to selected drive.
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -26,11 +24,11 @@ echo -ne "
Setting up mirrors for optimal download Setting up mirrors for optimal download
" "
source $CONFIGS_DIR/setup.conf source $CONFIGS_DIR/setup.conf
iso=$(curl -4 ifconfig.co/country-iso) iso=$(curl -4 ifconfig.co/country-iso) #X output: "CH
timedatectl set-ntp true timedatectl set-ntp true
pacman -S --noconfirm archlinux-keyring #update keyrings to latest to prevent packages failing to install pacman -S --noconfirm archlinux-keyring #update keyrings to latest to prevent packages failing to install
pacman -S --noconfirm --needed pacman-contrib terminus-font pacman -S --noconfirm --needed pacman-contrib terminus-font
setfont ter-v22b setfont ter-v22b #X change font
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
pacman -S --noconfirm --needed reflector rsync grub pacman -S --noconfirm --needed reflector rsync grub
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
@ -54,7 +52,7 @@ echo -ne "
" "
umount -A --recursive /mnt # make sure everything is unmounted before we start umount -A --recursive /mnt # make sure everything is unmounted before we start
# disk prep # disk prep
sgdisk -Z ${DISK} # zap all on disk sgdisk -Z ${DISK} # zap all on disk #X destroys/wipes the whole drive
sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment
# create partitions # create partitions
@ -72,7 +70,6 @@ echo -ne "
Creating Filesystems Creating Filesystems
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
# @description Creates the btrfs subvolumes.
createsubvolumes () { createsubvolumes () {
btrfs subvolume create /mnt/@ btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home btrfs subvolume create /mnt/@home
@ -81,7 +78,6 @@ createsubvolumes () {
btrfs subvolume create /mnt/@.snapshots btrfs subvolume create /mnt/@.snapshots
} }
# @description Mount all btrfs subvolumes after root has been mounted.
mountallsubvol () { mountallsubvol () {
mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home
mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp
@ -89,7 +85,6 @@ mountallsubvol () {
mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots
} }
# @description BTRFS subvolulme creation and mounting.
subvolumesetup () { subvolumesetup () {
# create nonroot subvolumes # create nonroot subvolumes
createsubvolumes createsubvolumes
@ -155,7 +150,7 @@ pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyri
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
#X dual boot hier? os-prober????
genfstab -L /mnt >> /mnt/etc/fstab genfstab -L /mnt >> /mnt/etc/fstab
echo " echo "
Generated /etc/fstab: Generated /etc/fstab:
@ -177,6 +172,7 @@ echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
# my Acer swift3 has more than 8000000kb ram
if [[ $TOTAL_MEM -lt 8000000 ]]; then if [[ $TOTAL_MEM -lt 8000000 ]]; then
# Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything. # Put swap into the actual system, not into RAM disk, otherwise there is no point in it, it'll cache RAM into RAM. So, /mnt/ everything.
mkdir -p /mnt/opt/swap # make a dir that we can apply NOCOW to to make it btrfs-friendly. mkdir -p /mnt/opt/swap # make a dir that we can apply NOCOW to to make it btrfs-friendly.

View File

@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#github-action genshdoc #github-action genshdoc
#
# @file Setup
# @brief Configures installed system, installs base packages, and creates user.
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -22,7 +19,7 @@ echo -ne "
Network Setup Network Setup
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
pacman -S --noconfirm --needed networkmanager dhclient pacman -S --noconfirm --needed networkmanager dhclient #X dhcclient unnecessary?
systemctl enable --now NetworkManager systemctl enable --now NetworkManager
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -48,21 +45,33 @@ sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg
fi fi
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
Setup Language to US and set locale Setup Language to DE and set locale
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen # my locale on my ACER:
# System Locale: LANG=en_US.UTF-8
# LC_TIME=de_CH.UTF-8
# VC Keymap: de-latin1-nodeadkeys
# X11 Layout: de
# X11 Model: acer_laptop
# X11 Variant: nodeadkeys
#
# sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
sed -i 's/^#de_CH.UTF-8 UTF-8/de_CH.UTF-8 UTF-8/' /etc/locale.gen
locale-gen locale-gen
timedatectl --no-ask-password set-timezone ${TIMEZONE} timedatectl --no-ask-password set-timezone ${TIMEZONE}
timedatectl --no-ask-password set-ntp 1 timedatectl --no-ask-password set-ntp 1
localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" # localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8"
localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="de_CH.UTF-8"
ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
# Set keymaps # Set keymaps
localectl --no-ask-password set-keymap ${KEYMAP} localectl --no-ask-password set-keymap ${KEYMAP}
localectl set-x11-keymap de acer_laptop nodeadkeys
# Add sudo no password rights #X Sudo shall require password
sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers # # Add sudo no password rights
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers # sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
# sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
#Add parallel downloading #Add parallel downloading
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
@ -76,7 +85,7 @@ echo -ne "
Installing Base System Installing Base System
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
# sed $INSTALL_TYPE is using install type to check for MINIMAL installation, if it's true, stop # sed $INSTALL_TYPE is using install type to check for MINIMAL installation, if it's true, stop #X 'trims' the file
# stop the script and move on, not installing any more packages below that line # stop the script and move on, not installing any more packages below that line
if [[ ! $DESKTOP_ENV == server ]]; then if [[ ! $DESKTOP_ENV == server ]]; then
sed -n '/'$INSTALL_TYPE'/q;p' $HOME/ArchTitus/pkg-files/pacman-pkgs.txt | while read line sed -n '/'$INSTALL_TYPE'/q;p' $HOME/ArchTitus/pkg-files/pacman-pkgs.txt | while read line
@ -85,8 +94,10 @@ if [[ ! $DESKTOP_ENV == server ]]; then
# If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line # If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line
continue continue
fi fi
if [[ ! $line = \#* ]] ; then
echo "INSTALLING: ${line}" echo "INSTALLING: ${line}"
sudo pacman -S --noconfirm --needed ${line} sudo pacman -S --noconfirm --needed ${line}
fi
done done
fi fi
echo -ne " echo -ne "

View File

@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#github-action genshdoc #github-action genshdoc
#
# @file User
# @brief User customizations and AUR package installation.
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -20,10 +17,11 @@ source $HOME/ArchTitus/configs/setup.conf
cd ~ cd ~
mkdir "/home/$USERNAME/.cache" mkdir "/home/$USERNAME/.cache"
touch "/home/$USERNAME/.cache/zshhistory" #X DELETE:
git clone "https://github.com/ChrisTitusTech/zsh" # touch "/home/$USERNAME/.cache/zshhistory"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k # git clone "https://github.com/ChrisTitusTech/zsh"
ln -s "~/zsh/.zshrc" ~/.zshrc # git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
# ln -s "~/zsh/.zshrc" ~/.zshrc
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -62,8 +60,10 @@ if [[ ! $AUR_HELPER == none ]]; then
# If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line # If selected installation type is FULL, skip the --END OF THE MINIMAL INSTALLATION-- line
continue continue
fi fi
if [[ ! $line = \#* ]] ; then
echo "INSTALLING: ${line}" echo "INSTALLING: ${line}"
$AUR_HELPER -S --noconfirm --needed ${line} $AUR_HELPER -S --noconfirm --needed ${line}
fi
done done
fi fi

View File

@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#github-action genshdoc #github-action genshdoc
#
# @file Post-Setup
# @brief Finalizing installation configurations and cleaning up after script.
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -34,22 +31,22 @@ echo -ne "
if [[ "${FS}" == "luks" ]]; then if [[ "${FS}" == "luks" ]]; then
sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=${ENCRYPTED_PARTITION_UUID}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub sed -i "s%GRUB_CMDLINE_LINUX_DEFAULT=\"%GRUB_CMDLINE_LINUX_DEFAULT=\"cryptdevice=UUID=${ENCRYPTED_PARTITION_UUID}:ROOT root=/dev/mapper/ROOT %g" /etc/default/grub
fi fi
# set kernel parameter for adding splash screen # # set kernel parameter for adding splash screen
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub # sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& splash /' /etc/default/grub
echo -e "Installing CyberRe Grub theme..." # echo -e "Installing CyberRe Grub theme..."
THEME_DIR="/boot/grub/themes" # THEME_DIR="/boot/grub/themes"
THEME_NAME=CyberRe # THEME_NAME=CyberRe
echo -e "Creating the theme directory..." # echo -e "Creating the theme directory..."
mkdir -p "${THEME_DIR}/${THEME_NAME}" # mkdir -p "${THEME_DIR}/${THEME_NAME}"
echo -e "Copying the theme..." # echo -e "Copying the theme..."
cd ${HOME}/ArchTitus # cd ${HOME}/ArchTitus
cp -a configs${THEME_DIR}/${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME} # cp -a configs${THEME_DIR}/${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME}
echo -e "Backing up Grub config..." echo -e "Backing up Grub config..."
cp -an /etc/default/grub /etc/default/grub.bak cp -an /etc/default/grub /etc/default/grub.bak
echo -e "Setting the theme as the default..." # echo -e "Setting the theme as the default..."
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub # grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub # echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub
echo -e "Updating grub..." echo -e "Updating grub..."
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
echo -e "All set!" echo -e "All set!"
@ -115,7 +112,7 @@ echo -ne "
Creating Snapper Config Creating Snapper Config
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
# snapper is the snapshot-btrfs tool helper
SNAPPER_CONF="$HOME/ArchTitus/configs/etc/snapper/configs/root" SNAPPER_CONF="$HOME/ArchTitus/configs/etc/snapper/configs/root"
mkdir -p /etc/snapper/configs/ mkdir -p /etc/snapper/configs/
cp -rfv ${SNAPPER_CONF} /etc/snapper/configs/ cp -rfv ${SNAPPER_CONF} /etc/snapper/configs/

View File

@ -1,28 +1,23 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#github-action genshdoc #github-action genshdoc
# # This script will ask users about their prefrences
# @file Startup # like disk, file system, timezone, keyboard layout,
# @brief This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc. # user name, password, etc.
# @stdout Output routed to startup.log
# @stderror Output routed to startup.log
# @setting-header General Settings # set up a config file
# @setting CONFIG_FILE string[$CONFIGS_DIR/setup.conf] Location of setup.conf to be used by set_option and all subsequent scripts.
CONFIG_FILE=$CONFIGS_DIR/setup.conf CONFIG_FILE=$CONFIGS_DIR/setup.conf
if [ ! -f $CONFIG_FILE ]; then # check if file exists if [ ! -f $CONFIG_FILE ]; then # check if file exists
touch -f $CONFIG_FILE # create file if not exists touch -f $CONFIG_FILE # create file if not exists
fi fi
# @description set options in setup.conf # set options in setup.conf
# @arg $1 string Configuration variable.
# @arg $2 string Configuration value.
set_option() { set_option() {
if grep -Eq "^${1}.*" $CONFIG_FILE; then # check if option exists if grep -Eq "^${1}.*" $CONFIG_FILE; then # check if option exists
sed -i -e "/^${1}.*/d" $CONFIG_FILE # delete option if exists sed -i -e "/^${1}.*/d" $CONFIG_FILE # delete option if exists
fi fi
echo "${1}=${2}" >>$CONFIG_FILE # add option echo "${1}=${2}" >>$CONFIG_FILE # add option
} }
# @description Renders a text based list of options that can be selected by the # Renders a text based list of options that can be selected by the
# user using up, down and enter keys and returns the chosen option. # user using up, down and enter keys and returns the chosen option.
# #
# Arguments : list of options, maximum of 256 # Arguments : list of options, maximum of 256
@ -131,8 +126,6 @@ select_option() {
return $(( $active_col + $active_row * $colmax )) return $(( $active_col + $active_row * $colmax ))
} }
# @description Displays ArchTitus logo
# @noargs
logo () { logo () {
# This will be shown on every set as user is progressing # This will be shown on every set as user is progressing
echo -ne " echo -ne "
@ -148,9 +141,9 @@ echo -ne "
------------------------------------------------------------------------ ------------------------------------------------------------------------
" "
} }
# @description This function will handle file systems. At this movement we are handling only
# btrfs and ext4. Others will be added in future.
filesystem () { filesystem () {
# This function will handle file systems. At this movement we are handling only
# btrfs and ext4. Others will be added in future.
echo -ne " echo -ne "
Please Select your file system for both boot and root Please Select your file system for both boot and root
" "
@ -181,7 +174,6 @@ done
*) echo "Wrong option please select again"; filesystem;; *) echo "Wrong option please select again"; filesystem;;
esac esac
} }
# @description Detects and sets timezone.
timezone () { timezone () {
# Added this from arch wiki https://wiki.archlinux.org/title/System_time # Added this from arch wiki https://wiki.archlinux.org/title/System_time
time_zone="$(curl --fail https://ipapi.co/timezone)" time_zone="$(curl --fail https://ipapi.co/timezone)"
@ -204,7 +196,6 @@ case ${options[$?]} in
*) echo "Wrong option. Try again";timezone;; *) echo "Wrong option. Try again";timezone;;
esac esac
} }
# @description Set user's keyboard mapping.
keymap () { keymap () {
echo -ne " echo -ne "
Please select key board layout from this list" Please select key board layout from this list"
@ -218,7 +209,6 @@ echo -ne "Your key boards layout: ${keymap} \n"
set_option KEYMAP $keymap set_option KEYMAP $keymap
} }
# @description Choose whether drive is SSD or not.
drivessd () { drivessd () {
echo -ne " echo -ne "
Is this an ssd? yes/no: Is this an ssd? yes/no:
@ -236,7 +226,7 @@ case ${options[$?]} in
esac esac
} }
# @description Disk selection for drive to be used with installation. # selection for disk type
diskpart () { diskpart () {
echo -ne " echo -ne "
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -259,8 +249,6 @@ echo -e "\n${disk%|*} selected \n"
drivessd drivessd
} }
# @description Gather username and password to be used for installation.
userinfo () { userinfo () {
read -p "Please enter your username: " username read -p "Please enter your username: " username
set_option USERNAME ${username,,} # convert to lower case as in issue #109 set_option USERNAME ${username,,} # convert to lower case as in issue #109
@ -282,7 +270,6 @@ read -rep "Please enter your hostname: " nameofmachine
set_option NAME_OF_MACHINE $nameofmachine set_option NAME_OF_MACHINE $nameofmachine
} }
# @description Choose AUR helper.
aurhelper () { aurhelper () {
# Let the user choose AUR helper from predefined list # Let the user choose AUR helper from predefined list
echo -ne "Please enter your desired AUR helper:\n" echo -ne "Please enter your desired AUR helper:\n"
@ -292,7 +279,6 @@ aurhelper () {
set_option AUR_HELPER $aur_helper set_option AUR_HELPER $aur_helper
} }
# @description Choose Desktop Environment
desktopenv () { desktopenv () {
# Let the user choose Desktop Enviroment from predefined list # Let the user choose Desktop Enviroment from predefined list
echo -ne "Please select your desired Desktop Enviroment:\n" echo -ne "Please select your desired Desktop Enviroment:\n"
@ -302,7 +288,6 @@ desktopenv () {
set_option DESKTOP_ENV $desktop_env set_option DESKTOP_ENV $desktop_env
} }
# @description Choose whether to do full or minimal installation.
installtype () { installtype () {
echo -ne "Please select type of installation:\n\n echo -ne "Please select type of installation:\n\n
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n