install_scripts directory and install-deps.sh added
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
paru
|
||||
|
||||
@@ -1,12 +1,30 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# ---- colors ----
|
||||
RESET='\033[0m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
RED='\033[0;31m'
|
||||
# ----------------
|
||||
|
||||
# ----- variables ----
|
||||
disk="/dev/sde"
|
||||
efi_part_size=200
|
||||
swap_size=1024
|
||||
hostname="arch"
|
||||
normal_user="tola"
|
||||
# -------------------
|
||||
|
||||
# -------------- cheking system -----------------
|
||||
if [[ $(uname) != "Linux" ]]; then
|
||||
printf "$RED This is working only on Linux systems (only Arch Linux)\n$RESET"
|
||||
exit 1
|
||||
fi
|
||||
# ----------------------------------------------
|
||||
|
||||
# ---- umounting disks ----
|
||||
umount ${disk}*
|
||||
# -------------------------
|
||||
|
||||
# --------- partitioning disks -------------------
|
||||
wipefs -af $disk
|
||||
@@ -31,31 +49,56 @@ pacstrap /mnt base linux linux-firmware vim
|
||||
# -------------------------------------------------
|
||||
|
||||
# ---------------- system configuration --------------------
|
||||
# fstab
|
||||
|
||||
# ----- generating fstab -------------------
|
||||
genfstab -U /mnt > /mnt/etc/fstab
|
||||
# timezone
|
||||
# ------------------------------------------
|
||||
|
||||
# ----- installing timezone ----------------
|
||||
arch-chroot /mnt bash -c 'ln -svf /usr/share/zoneinfo/Asia/Novosibirsk /etc/localtime'
|
||||
# system clock
|
||||
# ------------------------------------------
|
||||
|
||||
# ------ configuring system clock ---------------
|
||||
arch-chroot /mnt bash -c 'hwclock --systohc --utc'
|
||||
# locale
|
||||
# -----------------------------------------------
|
||||
|
||||
# ------- installing locale ------------------
|
||||
arch-chroot /mnt bash -c 'printf "en_US.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8" >> /etc/locale.gen;locale-gen'
|
||||
arch-chroot /mnt bash -c 'printf "LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8" > /etc/locale.conf'
|
||||
# console
|
||||
# --------------------------------------------
|
||||
|
||||
# -------- configuring console ----------------------
|
||||
arch-chroot /mnt bash -c 'printf "FONT=Lat2-Terminus16\nKEYMAP=ruwin_alt_sh-UTF-8" > /etc/vconsole.conf'
|
||||
# networking hostname and hosts
|
||||
arch-chroot /mnt bash -c 'echo $hostname > /etc/hostname'
|
||||
arch-chroot /mnt bash -c 'printf "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 ${hostname}.localdomain ${hostname}" >> /etc/hosts'
|
||||
# root password and normal user
|
||||
# ---------------------------------------------------
|
||||
|
||||
# ----- configuring networking hostname and hosts -------
|
||||
arch-chroot /mnt /usr/bin/env -i hostname=$hostname bash -c 'echo $hostname > /etc/hostname'
|
||||
arch-chroot /mnt /usr/bin/env -i hostname=$hostname bash -c 'printf "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 ${hostname}.localdomain ${hostname}" >> /etc/hosts'
|
||||
# -------------------------------------------------------
|
||||
|
||||
# ----- installing root password and normal user -----------------------
|
||||
arch-chroot /mnt /usr/bin/env -i arch_user=$normal_user bash -c 'passwd;useradd -m -g users -G wheel -s /bin/bash $arch_user;passwd $arch_user'
|
||||
# sudo configuring
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# ------------ installing and configuring sudo -------------------
|
||||
arch-chroot /mnt bash -c 'pacman -S sudo;echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers'
|
||||
# installing grub and configuring
|
||||
# -------------------------------------------------
|
||||
|
||||
# ----------- installing and configuring grub ----------
|
||||
arch-chroot /mnt /usr/bin/env -i grubdisk=$disk bash -c 'pacman -S grub efibootmgr os-prober;grub-install $grubdisk;grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
# networkmanager
|
||||
# ------------------------------------------------------
|
||||
|
||||
# --------- installing and enabling networkmanager --------------------
|
||||
arch-chroot /mnt bash -c 'pacman -S netctl dhcpcd networkmanager network-manager-applet;systemctl enable NetworkManager'
|
||||
# for iphone
|
||||
# --------------------------------------------------------
|
||||
|
||||
# ------ deps for connecting iphone ----------------------
|
||||
arch-chroot /mnt bash -c 'pacman -S libimobiledevice usbmuxd'
|
||||
# -------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
# -- umounting filesystem ---
|
||||
#umount -R /mnt
|
||||
# ---------------------------
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# ---- colors ----
|
||||
RESET='\033[0m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
RED='\033[0;31m'
|
||||
# ----------------
|
||||
|
||||
# ------------ cheking system ------------------------------
|
||||
if [[ $(uname) != "Linux" ]]; then
|
||||
printf "$RED This is working only on Linux systems (only Arch Linux)\n$RESET"
|
||||
exit 1
|
||||
fi
|
||||
# ----------------------------------------------------------
|
||||
|
||||
# ---------------- upgrading system ------------------------
|
||||
printf "$GREEN upgrading system...\n$RESET"
|
||||
sudo pacman -Syu
|
||||
if [ $? ]; then
|
||||
printf "$GREEN upgrading system success $RESET[$GREEN ok $RESET]\n"
|
||||
else
|
||||
printf "$RED upgrading system not success $RESET[$RED err $RESET]\n"
|
||||
exit 1
|
||||
fi
|
||||
# -----------------------------------------------------------
|
||||
|
||||
# -------------------- installing deps ----------------------------
|
||||
printf "$GREEN installing deps... (vim, rofi-wayland, hyprland, waybar, ly, mako, neofetch, ranger, kitty, alacritty, hyprpaper)\n$RESET"
|
||||
sudo pacman -S vim rofi-wayland hyprland hyprpaper waybar ly mako neofetch ranger kitty alacritty
|
||||
if [ $? ]; then
|
||||
printf "$GREEN installing deps success $RESET[$GREEN ok $RESET]\n"
|
||||
else
|
||||
printf "$RED installing deps not success $RESET[$RED err $RESET]\n"
|
||||
exit 1
|
||||
fi
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# -------------- installing paru ---------------
|
||||
printf "$GREEN installing paru...\n$RESET"
|
||||
sudo pacman -S --needed base-devel
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
makepkg -si
|
||||
if [ $? ]; then
|
||||
printf "$GREEN installing paru success $RESET[$GREEN ok $RESET]\n"
|
||||
else
|
||||
printf "$RED installing paru not success $RESET[$RED err $RESET]\n"
|
||||
exit 1
|
||||
fi
|
||||
# ----------------------------------------------
|
||||
|
||||
# ---------------------- installing deps from AUR ------------------------
|
||||
printf "$GREEN installing deps from AUR... (rofi-greenclip, hyprlock)\n$RESET"
|
||||
paru -S rofi-greenclip hyprlock
|
||||
if [ $? ]; then
|
||||
printf "$GREEN installing deps from AUR success $RESET[$GREEN ok $RESET]\n"
|
||||
else
|
||||
printf "$RED installing deps from AUR not success $RESET[$RED err $RESET]\n"
|
||||
exit 1
|
||||
fi
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
@@ -7,6 +7,13 @@ YELLOW='\033[0;33m'
|
||||
RED='\033[0;31m'
|
||||
# ----------------
|
||||
|
||||
# ---------------- cheking system ---------------------------
|
||||
if [[ $(uname) != "Linux" ]]; then
|
||||
printf "$RED This is working only on Linux systems (only Arch Linux)\n$RESET"
|
||||
exit 1
|
||||
fi
|
||||
# ----------------------------------------------------------
|
||||
|
||||
# -------------- ~/.config/hypr ----------------------------
|
||||
printf "$GREEN installing hyprland configuration...$RESET"
|
||||
if [ ! -d ~/.config/hypr ]; then
|
||||
Reference in New Issue
Block a user