├── LICENSE ├── README.md ├── archx.sh ├── configs ├── .bash_profile ├── boot │ └── grub │ │ └── themes │ │ └── PolyDark │ │ ├── README.md │ │ ├── background.png │ │ ├── icons │ │ ├── antergos.png │ │ ├── arch.png │ │ ├── artix.png │ │ ├── chakra.png │ │ ├── debian.png │ │ ├── deepin.png │ │ ├── elementary.png │ │ ├── fedora.png │ │ ├── gentoo.png │ │ ├── gnu-linux.png │ │ ├── kali.png │ │ ├── kaos.png │ │ ├── korora.png │ │ ├── kubuntu.png │ │ ├── lfs.png │ │ ├── linuxmint.png │ │ ├── lubuntu.png │ │ ├── mageia.png │ │ ├── manjaro.png │ │ ├── opensuse.png │ │ ├── siduction.png │ │ ├── ubuntu.png │ │ ├── void.png │ │ ├── windows.png │ │ └── xubuntu.png │ │ ├── item_c.png │ │ ├── selected_item_c.png │ │ ├── terminal_box_c.png │ │ ├── theme.txt │ │ └── unifont-regular-16.pf2 └── etc │ ├── X11 │ ├── xinit │ │ ├── xinitrc │ │ ├── xinitrc.d │ │ │ └── 30-gtk3-nocsd.sh │ │ └── xinitrcterm │ └── xorg.conf.d │ │ └── 30-touchpad.conf │ ├── conf.d │ └── snapper │ ├── samba │ └── smb.conf │ ├── snapper │ └── configs │ │ └── root │ └── sysctl.d │ └── 99-custom.conf ├── install ├── iso-build ├── README.md ├── build.sh └── patch │ ├── airootfs │ └── root │ │ ├── .zlogin │ │ └── wifi-menu.sh │ └── syslinux │ └── splash.png ├── pkg-files ├── README.md ├── aur-pkgs.txt ├── awesome.txt ├── pacman-pkgs.txt └── server.txt └── scripts ├── 0-preinstall.sh ├── 1-setup.sh ├── 2-user.sh ├── 3-post-setup.sh ├── README.md ├── awesome-minimal.sh ├── awesome.sh └── startup.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 X3ric 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | ### Installation 4 | 5 | Download [Arch.Iso](https://archlinux.org/download/) and create bootable USB and launch or go to [ArchX.iso](https://github.com/X3ric/ArchX/releases/tag/V0.1) instead to skip all steps. 6 | 7 | ### Boot and in prompt type the following commands 8 | 9 |
10 |

set console layout

11 | 12 |
13 | loadkeys {Layout} // example it,en,es
14 | 
15 | 16 |
17 | 18 |
19 | curl -s https://raw.githubusercontent.com/X3ric/ArchX/master/install | bash
20 | 
21 | 22 |
23 | 24 |

No ethernet?

25 | 26 | ### No wifi? 27 | 28 | 1: Run `iwctl` 29 | 30 | 2: Run `device list`, and find your device name. 31 | 32 | 3: Run `station [device name] scan` 33 | 34 | 4: Run `station [device name] get-networks` 35 | 36 | 5: Run `station [device name] connect [network name]`, enter your wifi password. 37 | 38 | 6: Ctrl and C to exit. 39 | 40 | Optional `ping archlinux.org`, and then Press Ctrl and C to stop. 41 | 42 |
43 |

Wifi Blocked?

44 | 45 | check if the WiFi is blocked by running `rfkill list`. 46 | 47 | If says **Soft blocked: yes**, then run `rfkill unblock wifi` 48 |
49 |
50 |

51 | Arch Linux 52 |


53 | 54 | 55 | -------------------------------------------------------------------------------- /archx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -a 3 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts 5 | CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs 6 | set +a 7 | pacman -Sy --noconfirm 8 | pacman -S --noconfirm --needed terminus-font 9 | alias pacman='pacman --color always' 10 | alias yay='yay --color always' 11 | setfont ter-v22b 12 | clear 13 | echo -nE " 14 | _____ __ _____ 15 | / _ \ _______ ____ | |__ / \ ____ ____ __ __ 16 | / /_\ \ \_ __ \/ ___\ | | \ / \ / \/ __ \ / \ | | \ 17 | / | \ | | \/\ \___ | Y \ / Y \ ___/ | | \| | / 18 | \____|__ / |__| \___ >|___| / \____|__ /\___ >|___| /|____/ 19 | \/ \/ \/ \/ \/ \/ 20 | _____________________________________ 21 | \ Automated Arch Linux Installer / 22 | \_________________________________/ 23 | 24 | " 25 | ( bash $SCRIPT_DIR/scripts/startup.sh )|& tee startup.log 26 | source $CONFIGS_DIR/setup.conf 27 | ( bash $SCRIPT_DIR/scripts/0-preinstall.sh )|& tee 0-preinstall.log 28 | ( arch-chroot /mnt $HOME/ArchX/scripts/1-setup.sh )|& tee 1-setup.log 29 | if [[ ! $DESKTOP_ENV == server ]]; then 30 | ( arch-chroot /mnt /usr/bin/runuser -u $USERNAME -- /home/$USERNAME/ArchX/scripts/2-user.sh )|& tee 2-user.log 31 | fi 32 | ( arch-chroot /mnt $HOME/ArchX/scripts/3-post-setup.sh )|& tee 3-post-setup.log 33 | mkdir -p /mnt/home/$USERNAME/.cache/archx/ 34 | cp -v *.log /mnt/home/$USERNAME/.cache/archx/ 35 | echo -nE " 36 | __________ __ __ __ 37 | \_ _____/|__| ____ |__| ______| |__ 38 | | __) | | / \ | | / ___/| | \ 39 | | \ | || | \| | \___ \ | Y \ 40 | \__ / |__||___| /|__|/____ >|___| / 41 | \/ \/ \/ \/ 42 | _____________________________________ 43 | \ Automated Arch Linux Installer / 44 | \_________________________________/ 45 | 46 | Done - Please Eject Install Media and Run reboot 47 | 48 | " 49 | -------------------------------------------------------------------------------- /configs/.bash_profile: -------------------------------------------------------------------------------- 1 | if [[ "$(tty)" = "/dev/tty1" ]]; then 2 | [ -f $HOME/awesome*.sh ] && sleep 10 && ./awesome*.sh 3 | fi 4 | -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/README.md: -------------------------------------------------------------------------------- 1 | ## Poly dark GRUB theme 2 | 3 | Supported languages: Chinese (simplified), English, French, German, Italian, Latvian, Norwegian, Portuguese, Russian, Rusyn, Spanish, Turkish, Ukrainian 4 | 5 | ![](https://i.imgur.com/OHGyR2N.gif) 6 | 7 | ### Installation 8 | 9 | go to scripts/3-post-setup.sh edit "PolyDark" with the name/folder you chose. 10 | -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/background.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/antergos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/antergos.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/arch.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/artix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/artix.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/chakra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/chakra.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/debian.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/deepin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/deepin.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/elementary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/elementary.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/fedora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/fedora.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/gentoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/gentoo.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/gnu-linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/gnu-linux.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/kali.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/kali.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/kaos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/kaos.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/korora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/korora.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/kubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/kubuntu.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/lfs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/lfs.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/linuxmint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/linuxmint.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/lubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/lubuntu.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/mageia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/mageia.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/manjaro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/manjaro.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/opensuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/opensuse.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/siduction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/siduction.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/ubuntu.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/void.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/void.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/windows.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/icons/xubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/icons/xubuntu.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/item_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/item_c.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/selected_item_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/selected_item_c.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/terminal_box_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/terminal_box_c.png -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/theme.txt: -------------------------------------------------------------------------------- 1 | # Global properties 2 | title-text: "" 3 | desktop-image: "background.png" 4 | desktop-color: "#000000" 5 | terminal-font: "Unifont Regular 18" 6 | terminal-box: "terminal_box_*.png" 7 | terminal-left: "0" 8 | terminal-top: "0" 9 | terminal-width: "100%" 10 | terminal-height: "100%" 11 | terminal-border: "0" 12 | 13 | # Boot menu 14 | + boot_menu { 15 | left = 15% 16 | top = 20% 17 | width = 70% 18 | height = 60% 19 | item_font = "Unifont Regular 18" 20 | item_color = "#777777" 21 | selected_item_color = "#999999" 22 | item_height = 40 23 | item_spacing = 4 24 | item_pixmap_style = "item_*.png" 25 | selected_item_pixmap_style = "selected_item_*.png" 26 | } 27 | 28 | # Countdown message 29 | + label { 30 | left = 0 31 | top = 100%-48 32 | width = 100% 33 | align = "center" 34 | id = "__timeout__" 35 | # DE 36 | # text = "Start in %d Sekunden." 37 | # EN 38 | text = "Booting in %d seconds" 39 | # ES 40 | # text = "Arranque en %d segundos" 41 | # FR 42 | # text = "Démarrage automatique dans %d secondes" 43 | # IT 44 | # text = "Avvio in %d secondi" 45 | # LV 46 | # text = "Inicializē pēc %d sekundēm." 47 | # NO 48 | # text = "Starter om %d sekunder" 49 | # PT 50 | # text = "Arranque automático dentro de %d segundos" 51 | # RU 52 | # text = "Загрузка выбранного пункта через %d сек." 53 | # RUE 54 | # text = "Автоматичноє терьханя начне ся через %d секунд" 55 | # TR 56 | # text = "%d saniye sonra önyükleme başlayacak." 57 | # UA 58 | # text = "Автоматичне завантаження розпочнеться через %d сек." 59 | # zh_CN 60 | # text = "在 %d 内启动" 61 | color = "#777777" 62 | font = "Unifont Regular 18" 63 | } 64 | 65 | # Navigation keys hint 66 | + label { 67 | left = 0 68 | top = 100%-24 69 | width = 100% 70 | align = "center" 71 | # DE 72 | # text = "System mit ↑ und ↓ auswählen und mit Enter bestätigen." 73 | # EN 74 | text = "Use ↑ and ↓ keys to change selection, Enter to confirm" 75 | # ES 76 | # text = "Use las teclas ↑ y ↓ para cambiar la selección, Enter para confirmar" 77 | # FR 78 | # text = "Choisissez le système avec les flèches du clavier (↑ et ↓), puis validez avec la touche Enter (↲)" 79 | # IT 80 | # text = "Usa i tasti ↑ e ↓ per cambiare la selezione, premi Invio ↲ per confermare" 81 | # LV 82 | # text = "Izmantojiet ↑ un ↓ bultiņas, lai mainītu izvēli, Enter ↲, lai apstiprinātu." 83 | # NO 84 | # text = "Bruk ↑ og ↓ for å endre menyvalg, velg med Enter" 85 | # PT 86 | # text = "Use as teclas ↑ e ↓ para mudar a seleção, e ENTER para confirmar" 87 | # RU 88 | # text = "Используйте клавиши ↑ и ↓ для изменения выбора, Enter для подтверждения" 89 | # RUE 90 | # text = "Хоснуйте ↑ тай ↓ на убераня, Enter на пудтверженя" 91 | # TR 92 | # text = "Seçiminizi değiştirmek için ↑ ve ↓ tuşlarını, onaylamak için ise Enter tuşunu kullanabilirsiniz" 93 | # UA 94 | # text = "Використовуйте ↑ та ↓ для вибору, Enter для підтвердження" 95 | # zh_CN 96 | # text = "使用 ↑ 和 ↓ 键移动选择条,Enter 键确认" 97 | color = "#777777" 98 | font = "Unifont Regular 18" 99 | } 100 | -------------------------------------------------------------------------------- /configs/boot/grub/themes/PolyDark/unifont-regular-16.pf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/configs/boot/grub/themes/PolyDark/unifont-regular-16.pf2 -------------------------------------------------------------------------------- /configs/etc/X11/xinit/xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pywall=$HOME/.cache/wal/colors.Xresources 3 | userresources=$HOME/.Xresources 4 | usermodmap=$HOME/.Xmodmap 5 | sysresources=/etc/X11/xinit/.Xresources 6 | sysmodmap=/etc/X11/xinit/.Xmodmap 7 | if [ -f $sysresources ]; then 8 | xrdb -merge $sysresources 9 | fi 10 | if [ -f $sysmodmap ]; then 11 | xmodmap $sysmodmap 12 | fi 13 | if [ -f "$userresources" ]; then 14 | xrdb -merge "$userresources" 15 | if [ -f "$pywall" ]; then 16 | xrdb -merge "$pywall" 17 | fi 18 | fi 19 | if [ -f "$usermodmap" ]; then 20 | xmodmap "$usermodmap" 21 | fi 22 | if [ -d /etc/X11/xinit/xinitrc.d ] ; then 23 | for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 24 | [ -x "$f" ] && . "$f" 25 | done 26 | unset f 27 | fi 28 | export GTK_CSD=1 29 | xrandr --auto 30 | $HOME/.local/share/bin/autostart 31 | exec awesome 32 | -------------------------------------------------------------------------------- /configs/etc/X11/xinit/xinitrc.d/30-gtk3-nocsd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -n "${GNOME_DESKTOP_SESSION_ID-}" ]; then 4 | # just in case DESKTOP_SESSION wasn't properly set 5 | _session=gnome 6 | else 7 | _session="${DESKTOP_SESSION-}" 8 | fi 9 | 10 | case "${_session}" in 11 | 12 | gnome|gnome-*|*/gnome|*/gnome-*) 13 | unset GTK_CSD 14 | ;; 15 | 16 | *) 17 | export GTK_CSD=0 18 | export LD_PRELOAD="/usr/lib/libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}" 19 | ;; 20 | esac 21 | 22 | unset _session 23 | -------------------------------------------------------------------------------- /configs/etc/X11/xinit/xinitrcterm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pywall=$HOME/.cache/wal/colors.Xresources 3 | userresources=$HOME/.Xresources 4 | usermodmap=$HOME/.Xmodmap 5 | sysresources=/etc/X11/xinit/.Xresources 6 | sysmodmap=/etc/X11/xinit/.Xmodmap 7 | if [ -f $sysresources ]; then 8 | xrdb -merge $sysresources 9 | fi 10 | if [ -f $sysmodmap ]; then 11 | xmodmap $sysmodmap 12 | fi 13 | if [ -f "$userresources" ]; then 14 | xrdb -merge "$userresources" 15 | if [ -f "$pywall" ]; then 16 | xrdb -merge "$pywall" 17 | fi 18 | fi 19 | if [ -f "$usermodmap" ]; then 20 | xmodmap "$usermodmap" 21 | fi 22 | if [ -d /etc/X11/xinit/xinitrc.d ] ; then 23 | for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 24 | [ -x "$f" ] && . "$f" 25 | done 26 | unset f 27 | fi 28 | xrandr --auto 29 | $HOME/.local/share/bin/autostart 30 | exec kitty -c $HOME/.config/kitty/kittyfullscreen.conf 31 | -------------------------------------------------------------------------------- /configs/etc/X11/xorg.conf.d/30-touchpad.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "libinput touchpad catchall" 3 | MatchIstouchpad "on" 4 | MatchDevicePath "/dev/input/event*" 5 | Driver "libinput" 6 | Option "Tapping" "on" 7 | EndSection 8 | -------------------------------------------------------------------------------- /configs/etc/conf.d/snapper: -------------------------------------------------------------------------------- 1 | ## Path: System/Snapper 2 | 3 | ## Type: string 4 | ## Default: "" 5 | # List of snapper configurations. 6 | SNAPPER_CONFIGS="root" 7 | -------------------------------------------------------------------------------- /configs/etc/samba/smb.conf: -------------------------------------------------------------------------------- 1 | # This is the main Samba configuration file. You should read the 2 | # smb.conf(5) manual page in order to understand the options listed 3 | # here. Samba has a huge number of configurable options (perhaps too 4 | # many!) most of which are not shown in this example 5 | # 6 | # For a step to step guide on installing, configuring and using samba, 7 | # read the Samba-HOWTO-Collection. This may be obtained from: 8 | # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf 9 | # 10 | # Many working examples of smb.conf files can be found in the 11 | # Samba-Guide which is generated daily and can be downloaded from: 12 | # http://www.samba.org/samba/docs/Samba-Guide.pdf 13 | # 14 | # Any line which starts with a ; (semi-colon) or a # (hash) 15 | # is a comment and is ignored. In this example we will use a # 16 | # for commentry and a ; for parts of the config file that you 17 | # may wish to enable 18 | # 19 | # NOTE: Whenever you modify this file you should run the command "testparm" 20 | # to check that you have not made any basic syntactic errors. 21 | # 22 | #======================= Global Settings ===================================== 23 | [global] 24 | 25 | # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH 26 | workgroup = WORKGROUP 27 | 28 | # server string is the equivalent of the NT Description field 29 | server string = Samba Server 30 | 31 | # Usershares 32 | 33 | ; usershare path = /var/lib/samba/usershares 34 | ; usershare max shares = 100 35 | ; usershare allow guests = yes 36 | ; usershare owner only = yes 37 | 38 | # Windows 39 | 40 | # allows users without accounts on Samba to login and become guest 41 | ; map to guest = Bad Password 42 | 43 | # who is responsible for passwords 44 | ; passwd program = /usr/bin/passwd %u 45 | 46 | # updates the password in Samba if you change the password in Linux 47 | ; unix password sync = Yes 48 | 49 | # minimum protocol version that the client will attempt to use 50 | ; client min protocol = SMB2 51 | 52 | # Server role. Defines in which mode Samba will operate. Possible 53 | # values are "standalone server", "member server", "classic primary 54 | # domain controller", "classic backup domain controller", "active 55 | # directory domain controller". 56 | # 57 | # Most people will want "standalone server" or "member server". 58 | # Running as "active directory domain controller" will require first 59 | # running "samba-tool domain provision" to wipe databases and create a 60 | # new domain. 61 | server role = standalone server 62 | 63 | # This option is important for security. It allows you to restrict 64 | # connections to machines which are on your local network. The 65 | # following example restricts access to two C class networks and 66 | # the "loopback" interface. For more examples of the syntax see 67 | # the smb.conf man page 68 | ; hosts allow = 192.168.1. 192.168.2. 127. 69 | 70 | # Uncomment this if you want a guest account, you must add this to /etc/passwd 71 | # otherwise the user "nobody" is used 72 | ; guest account = pcguest 73 | 74 | # this tells Samba to use a separate log file for each machine 75 | # that connects 76 | log file = /var/log/samba/%m.log 77 | 78 | # Put a capping on the size of the log files (in Kb). 79 | max log size = 50 80 | 81 | # Specifies the Kerberos or Active Directory realm the host is part of 82 | ; realm = MY_REALM 83 | 84 | # Backend to store user information in. New installations should 85 | # use either tdbsam or ldapsam. smbpasswd is available for backwards 86 | # compatibility. tdbsam requires no further configuration. 87 | ; passdb backend = tdbsam 88 | 89 | # Using the following line enables you to customise your configuration 90 | # on a per machine basis. The %m gets replaced with the netbios name 91 | # of the machine that is connecting. 92 | # Note: Consider carefully the location in the configuration file of 93 | # this line. The included file is read at that point. 94 | ; include = /usr/local/samba/lib/smb.conf.%m 95 | 96 | # Configure Samba to use multiple interfaces 97 | # If you have multiple network interfaces then you must list them 98 | # here. See the man page for details. 99 | ; interfaces = 192.168.12.2/24 192.168.13.2/24 100 | 101 | # Where to store roving profiles (only for Win95 and WinNT) 102 | # %L substitutes for this servers netbios name, %U is username 103 | # You must uncomment the [Profiles] share below 104 | ; logon path = \\%L\Profiles\%U 105 | 106 | # Windows Internet Name Serving Support Section: 107 | # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server 108 | ; wins support = yes 109 | 110 | # WINS Server - Tells the NMBD components of Samba to be a WINS Client 111 | # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both 112 | ; wins server = w.x.y.z 113 | 114 | # WINS Proxy - Tells Samba to answer name resolution queries on 115 | # behalf of a non WINS capable client, for this to work there must be 116 | # at least one WINS Server on the network. The default is NO. 117 | ; wins proxy = yes 118 | 119 | # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names 120 | # via DNS nslookups. The default is NO. 121 | dns proxy = no 122 | 123 | # These scripts are used on a domain controller or stand-alone 124 | # machine to add or delete corresponding unix accounts 125 | ; add user script = /usr/sbin/useradd %u 126 | ; add group script = /usr/sbin/groupadd %g 127 | ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u 128 | ; delete user script = /usr/sbin/userdel %u 129 | ; delete user from group script = /usr/sbin/deluser %u %g 130 | ; delete group script = /usr/sbin/groupdel %g 131 | 132 | 133 | #============================ Share Definitions ============================== 134 | [homes] 135 | comment = Home Directories 136 | browseable = no 137 | writable = yes 138 | 139 | # Un-comment the following and create the netlogon directory for Domain Logons 140 | ; [netlogon] 141 | ; comment = Network Logon Service 142 | ; path = /usr/local/samba/lib/netlogon 143 | ; guest ok = yes 144 | ; writable = no 145 | ; share modes = no 146 | 147 | 148 | # Un-comment the following to provide a specific roving profile share 149 | # the default is to use the user's home directory 150 | ;[Profiles] 151 | ; path = /usr/local/samba/profiles 152 | ; browseable = no 153 | ; guest ok = yes 154 | 155 | 156 | # NOTE: If you have a BSD-style print system there is no need to 157 | # specifically define each individual printer 158 | [printers] 159 | comment = All Printers 160 | path = /usr/spool/samba 161 | browseable = no 162 | # Set public = yes to allow user 'guest account' to print 163 | guest ok = no 164 | writable = no 165 | printable = yes 166 | 167 | # This one is useful for people to share files 168 | ;[tmp] 169 | ; comment = Temporary file space 170 | ; path = /tmp 171 | ; read only = no 172 | ; public = yes 173 | 174 | # A publicly accessible directory, but read only, except for people in 175 | # the "staff" group 176 | ;[public] 177 | ; comment = Public Stuff 178 | ; path = /home/samba 179 | ; public = yes 180 | ; writable = no 181 | ; printable = no 182 | ; write list = @staff 183 | 184 | # Other examples. 185 | # 186 | # A private printer, usable only by fred. Spool data will be placed in fred's 187 | # home directory. Note that fred must have write access to the spool directory, 188 | # wherever it is. 189 | ;[fredsprn] 190 | ; comment = Fred's Printer 191 | ; valid users = fred 192 | ; path = /homes/fred 193 | ; printer = freds_printer 194 | ; public = no 195 | ; writable = no 196 | ; printable = yes 197 | 198 | # A private directory, usable only by fred. Note that fred requires write 199 | # access to the directory. 200 | ;[fredsdir] 201 | ; comment = Fred's Service 202 | ; path = /usr/somewhere/private 203 | ; valid users = fred 204 | ; public = no 205 | ; writable = yes 206 | ; printable = no 207 | 208 | # a service which has a different directory for each machine that connects 209 | # this allows you to tailor configurations to incoming machines. You could 210 | # also use the %U option to tailor it by user name. 211 | # The %m gets replaced with the machine name that is connecting. 212 | ;[pchome] 213 | ; comment = PC Directories 214 | ; path = /usr/pc/%m 215 | ; public = no 216 | ; writable = yes 217 | 218 | # A publicly accessible directory, read/write to all users. Note that all files 219 | # created in the directory by users will be owned by the default user, so 220 | # any user with access can delete any other user's files. Obviously this 221 | # directory must be writable by the default user. Another user could of course 222 | # be specified, in which case all files would be owned by that user instead. 223 | ;[public] 224 | ; path = /usr/somewhere/else/public 225 | ; public = yes 226 | ; only guest = yes 227 | ; writable = yes 228 | ; printable = no 229 | 230 | # The following two entries demonstrate how to share a directory so that two 231 | # users can place files there that will be owned by the specific users. In this 232 | # setup, the directory should be writable by both users and should have the 233 | # sticky bit set on it to prevent abuse. Obviously this could be extended to 234 | # as many users as required. 235 | ;[myshare] 236 | ; comment = Mary's and Fred's stuff 237 | ; path = /usr/somewhere/shared 238 | ; valid users = mary fred 239 | ; public = no 240 | ; writable = yes 241 | ; printable = no 242 | ; create mask = 0765 243 | 244 | # Change the username - create the SHARED folder 245 | ;[SAMBASHARE] 246 | ;path = /home/erik/SHARED 247 | ;browseable = yes 248 | ;guest ok = yes 249 | ;public = yes 250 | ;writable = yes 251 | -------------------------------------------------------------------------------- /configs/etc/snapper/configs/root: -------------------------------------------------------------------------------- 1 | # subvolume to snapshot 2 | SUBVOLUME="/" 3 | 4 | # filesystem type 5 | FSTYPE="btrfs" 6 | 7 | 8 | # btrfs qgroup for space aware cleanup algorithms 9 | QGROUP="" 10 | 11 | 12 | # fraction or absolute size of the filesystems space the snapshots may use 13 | SPACE_LIMIT="0.5" 14 | 15 | # fraction or absolute size of the filesystems space that should be free 16 | FREE_LIMIT="0.2" 17 | 18 | 19 | # users and groups allowed to work with config 20 | ALLOW_USERS="" 21 | ALLOW_GROUPS="" 22 | 23 | # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots 24 | # directory 25 | SYNC_ACL="no" 26 | 27 | 28 | # start comparing pre- and post-snapshot in background after creating 29 | # post-snapshot 30 | BACKGROUND_COMPARISON="yes" 31 | 32 | 33 | # run daily number cleanup 34 | NUMBER_CLEANUP="yes" 35 | 36 | # limit for number cleanup 37 | NUMBER_MIN_AGE="1800" 38 | NUMBER_LIMIT="10" 39 | NUMBER_LIMIT_IMPORTANT="5" 40 | 41 | 42 | # create hourly snapshots 43 | TIMELINE_CREATE="no" 44 | 45 | # cleanup hourly snapshots after some time 46 | TIMELINE_CLEANUP="yes" 47 | 48 | # limits for timeline cleanup 49 | TIMELINE_MIN_AGE="1800" 50 | TIMELINE_LIMIT_HOURLY="5" 51 | TIMELINE_LIMIT_DAILY="7" 52 | TIMELINE_LIMIT_WEEKLY="0" 53 | TIMELINE_LIMIT_MONTHLY="0" 54 | TIMELINE_LIMIT_YEARLY="0" 55 | 56 | 57 | # cleanup empty pre-post-pairs 58 | EMPTY_PRE_POST_CLEANUP="yes" 59 | 60 | # limits for empty pre-post-pair cleanup 61 | EMPTY_PRE_POST_MIN_AGE="1800" 62 | 63 | -------------------------------------------------------------------------------- /configs/etc/sysctl.d/99-custom.conf: -------------------------------------------------------------------------------- 1 | vm.max_map_count=262120 2 | vm.swappiness=10 3 | kernel.sysrq = 1 4 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | pacman -Sy 3 | pacman-key --init 4 | pacman -S --needed --noconfirm git 5 | git clone https://git.X3ric.com/ArchX 6 | chmod -R +x ArchX 7 | cd ArchX && ./archx.sh 8 | -------------------------------------------------------------------------------- /iso-build/README.md: -------------------------------------------------------------------------------- 1 | ### iso-build Folder 2 | 3 | This folder contains the scripts necessary to build the ArchX ISO image. 4 | 5 | #### Features: 6 | - Integrated Wi-Fi menu for network setup during installation 7 | - Automated ArchX configuration scripts 8 | 9 | #### Release Notes: 10 | - Updated GRUB wallpaper for a fresh look 11 | - Network automated menu runs when no connection is detected 12 | - ArchX script runs automatically after establishing a network connection 13 | 14 | #### To Compile the ISO: 15 | 1. Enter this folder 16 | 2. Run the following command: 17 | ```bash 18 | ./build.sh 19 | ``` 20 | 21 | #### Precompiled ISOs: 22 | - Precompiled ISO images can be found in the releases section 23 | - Note: These ISOs may not be updated with the latest Arch kernel and versions 24 | -------------------------------------------------------------------------------- /iso-build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ ! -z $PWD/archiso_releng ]]; then 3 | sudo rm -rf $PWD/archiso_releng 4 | fi 5 | if ! pacman -Qi archiso &> /dev/null; then 6 | sudo pacman -Sy archiso 7 | fi 8 | sudo cp -rf /usr/share/archiso/configs/releng $PWD/archiso_releng 9 | sudo cp -rf $PWD/patch/* $PWD/archiso_releng 10 | cd $PWD/archiso_releng && sudo mkarchiso -v . 11 | -------------------------------------------------------------------------------- /iso-build/patch/airootfs/root/.zlogin: -------------------------------------------------------------------------------- 1 | # fix for screen readers 2 | if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then 3 | setopt SINGLE_LINE_ZLE 4 | fi 5 | ~/.automated_script.sh 6 | if [[ $(tty) == "/dev/tty1" ]]; then 7 | chmod +x ./wifi-menu.sh 8 | echo -e "\nwait 15s for connection scanning\n" 9 | sleep 15 10 | if ! ping -c 1 google.com &> /dev/null; then echo "No internet connection. Running wifi-menu..."; sudo ./wifi-menu.sh; else echo "Internet connection available. Skipping wifi-menu."; fi 11 | pacman -Sy && pacman -S --needed --noconfirm archlinux-keyring && pacman-key --init && sleep 3 12 | curl -L -o repository.zip https://github.com/X3ric/ArchX/archive/refs/heads/main.zip && bsdtar -xf repository.zip && mv ./ArchX-main ./ArchX && sudo chmod -R +x ArchX && cd ArchX && ./archx.sh 13 | fi 14 | -------------------------------------------------------------------------------- /iso-build/patch/airootfs/root/wifi-menu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while true; do 3 | list_networks() { 4 | iwlist wlan0 scanning | grep "ESSID:" | sed -E 's/.*ESSID:"?([^"]+)"?/\1/' | grep -v '^$' | sort -u 5 | } 6 | connect_to_network() { 7 | local network_ssid="$1" 8 | read -sp "Enter the Wi-Fi password for \"$network_ssid\": " password 9 | echo 10 | iwctl --passphrase "$password" station wlan0 connect "$network_ssid" 11 | } 12 | IFS=$'\n' 13 | iw_networks=($(list_networks)) 14 | unset IFS 15 | echo "Available Wi-Fi networks:" 16 | echo "-------------------------" 17 | for i in "${!iw_networks[@]}"; do 18 | echo "$((i+1)). ${iw_networks[i]}" 19 | done 20 | read -p "Enter the number of the Wi-Fi network you want to connect to: " choice 21 | selected_network="${iw_networks[$((choice - 1))]}" 22 | connect_to_network "$selected_network" 23 | sleep 3 24 | if ping -c 4 8.8.8.8; then 25 | echo "Ping successful! Exiting..." 26 | break 27 | else 28 | echo "Ping failed. Retrying..." 29 | fi 30 | done -------------------------------------------------------------------------------- /iso-build/patch/syslinux/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/iso-build/patch/syslinux/splash.png -------------------------------------------------------------------------------- /pkg-files/README.md: -------------------------------------------------------------------------------- 1 | ### Pkg-files Folder 2 | 3 | This directory contains various package-related lists: 4 | 5 | - [`aur-pkgs.txt`](aur-pkgs.txt): A list of AUR (Arch User Repository) packages, enabling the installation of community-driven software not available in official repositories. 6 | 7 | - [`awesome.txt`](awesome.txt): A list of packages related to the "awesome" window manager, installable using pacman, Arch Linux's official package manager. 8 | 9 | - [`pacman-pkgs.txt`](pacman-pkgs.txt): A list of essential core pacman packages necessary for minimal installation, managed by Arch Linux's package manager. 10 | 11 | - [`server.txt`](server.txt): A list of packages required for setting up a server. The file remains empty as server installations aim to be minimal. 12 | 13 | `--END OF MINIMAL INSTALL--`: Indicates the end of the minimal installation section in the files. Packages listed below this point are part of the full installation. 14 | -------------------------------------------------------------------------------- /pkg-files/aur-pkgs.txt: -------------------------------------------------------------------------------- 1 | --END OF MINIMAL INSTALL-- 2 | ttf-meslo-nerd-font-powerlevel10k 3 | ttf-jetbrains-mono-nerd 4 | zsh-theme-powerlevel10k-bin-git 5 | autojump 6 | dashbinsh 7 | envycontrol 8 | rmtrash 9 | pinfo 10 | dragon-drop 11 | python-fuzzysearch 12 | libinput-gestures 13 | python-bs4 14 | -------------------------------------------------------------------------------- /pkg-files/awesome.txt: -------------------------------------------------------------------------------- 1 | mesa 2 | xorg 3 | xorg-apps 4 | xorg-drivers 5 | xorg-xinit 6 | xterm 7 | pavucontrol 8 | pipewire 9 | pipewire-alsa 10 | pipewire-pulse 11 | pipewire-jack 12 | rtkit 13 | gvfs 14 | gvfs-smb 15 | gvfs-mtp 16 | samba 17 | nss-mdns 18 | awesome 19 | --END OF MINIMAL INSTALL-- 20 | xclip 21 | playerctl 22 | # Shell 23 | dash 24 | # Utils 25 | network-manager-applet 26 | polkit-gnome 27 | python-pywal 28 | unclutter 29 | blueman 30 | arandr 31 | dust 32 | gpm 33 | # Cli Tools 34 | ncdu 35 | cmake 36 | github-cli 37 | lf 38 | jq 39 | atool 40 | chafa 41 | bat 42 | brightnessctl 43 | poppler 44 | aria2 45 | tmux 46 | btop 47 | git-delta 48 | glow 49 | highlight 50 | # Apps Utils 51 | gucharmap 52 | xfce4-clipman-plugin 53 | dconf-editor 54 | gpick 55 | # Archive 56 | engrampa 57 | # Apps 58 | kitty 59 | feh 60 | rofi 61 | rofi-emoji 62 | firefox 63 | f3d 64 | # Neovim 65 | neovim 66 | npm 67 | nodejs 68 | # Mpv 69 | mpd 70 | mpc 71 | mpv 72 | ncmpcpp 73 | # Thunar 74 | thunar 75 | thunar-volman 76 | thunar-archive-plugin 77 | thunar-media-tags-plugin 78 | ffmpegthumbnailer 79 | tumbler 80 | # Qt 81 | qt5ct 82 | kvantum 83 | kvantum-qt5 84 | # Fonts 85 | noto-fonts-emoji 86 | noto-fonts-cjk 87 | ttf-dejavu 88 | ttf-fira-code 89 | terminus-font 90 | # Python deps 91 | python 92 | python-gobject 93 | python-dbus 94 | python-mutagen 95 | python-mpd2 96 | # Globalmenu deps 97 | gtk3 98 | python-attrs 99 | appmenu-gtk-module 100 | libdbusmenu-gtk2 101 | libdbusmenu-gtk3 102 | libdbusmenu-qt5 103 | bamf 104 | -------------------------------------------------------------------------------- /pkg-files/pacman-pkgs.txt: -------------------------------------------------------------------------------- 1 | binutils 2 | ntp 3 | dosfstools 4 | linux-headers 5 | usbutils 6 | xdg-user-dirs 7 | ntfs-3g 8 | python-pip 9 | neofetch 10 | os-prober 11 | --END OF MINIMAL INSTALL-- 12 | zsh 13 | thefuck 14 | zsh-syntax-highlighting 15 | zsh-autosuggestions 16 | bluez 17 | bluez-libs 18 | bluez-utils 19 | efibootmgr 20 | exfat-utils 21 | fuse2 22 | fuse3 23 | fuseiso 24 | unrar 25 | unzip 26 | lsd 27 | fzf 28 | ripgrep 29 | -------------------------------------------------------------------------------- /pkg-files/server.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/x3ric/ArchX/f2a056dfafc8dab44c2d953c7d0a6ba37de31063/pkg-files/server.txt -------------------------------------------------------------------------------- /scripts/0-preinstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | clear 3 | echo -nE " 4 | _____ __ _________ __ 5 | / _ \_______ ____ | |__ / _____/____ _| |_ __ _________ 6 | / /_\ \_ __ \/ ___\ | | \ \_____ \/ __ \__ _\| | \____ \ 7 | / | \| |\/\ \___| Y \ / \ ___/ | | | | /| |_> > 8 | \____|__ /|__| \___ |___| //_______ /\___ >|__| |____/ | __/ 9 | \/ \/ \/ \/ \/ |__| 10 | _____________________________________ 11 | \ Automated Arch Linux Installer / 12 | \_________________________________/ 13 | 14 | Setting up mirrors for optimal download 15 | 16 | " 17 | source $CONFIGS_DIR/setup.conf 18 | timedatectl set-ntp true 19 | pacman -S --noconfirm archlinux-keyring 20 | pacman -S --noconfirm --needed pacman-contrib 21 | sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf 22 | sed -i 's/^#Color/Color/' /etc/pacman.conf 23 | pacman -S --noconfirm --needed reflector rsync curl grub 24 | cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup 25 | echo -ne " 26 | _____________________________________________________ 27 | Installing Prerequisites / 28 | ___________________________________________________/ 29 | 30 | " 31 | pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc 32 | echo -ne " 33 | ________________________________________________ 34 | Formatting Disk / 35 | ______________________________________________/ 36 | 37 | " 38 | umount -A --recursive /mnt &>/dev/null 39 | sgdisk -Z ${DISK} 40 | sgdisk -a 2048 -o ${DISK} 41 | sgdisk -n 1::+1M --typecode=1:ef02 --change-name=1:'BIOSBOOT' ${DISK} 42 | sgdisk -n 2::+500M --typecode=2:ef00 --change-name=2:'EFIBOOT' ${DISK} 43 | sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} 44 | if [[ ! -d "/sys/firmware/efi" ]]; then 45 | sgdisk -A 1:set:2 ${DISK} 46 | fi 47 | partprobe ${DISK} 48 | echo -ne " 49 | __________________________________________________ 50 | Creating Filesystems / 51 | ________________________________________________/ 52 | 53 | " 54 | createsubvolumes() { 55 | btrfs subvolume create /mnt/@ 56 | btrfs subvolume create /mnt/@home 57 | btrfs subvolume create /mnt/@var 58 | btrfs subvolume create /mnt/@tmp 59 | btrfs subvolume create /mnt/@.snapshots 60 | } 61 | mountallsubvol() { 62 | mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home 63 | mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp 64 | mount -o ${MOUNT_OPTIONS},subvol=@var ${partition3} /mnt/var 65 | mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots 66 | } 67 | subvolumesetup() { 68 | createsubvolumes 69 | umount /mnt 70 | mount -o ${MOUNT_OPTIONS},subvol=@ ${partition3} /mnt 71 | mkdir -p /mnt/{home,var,tmp,.snapshots,swap} 72 | mountallsubvol 73 | } 74 | if [[ "${DISK}" =~ "nvme" ]]; then 75 | partition2=${DISK}p2 76 | partition3=${DISK}p3 77 | elif [[ "${DISK}" =~ "mmc" ]]; then 78 | partition2=${DISK}p2 79 | partition3=${DISK}p3 80 | else 81 | partition2=${DISK}2 82 | partition3=${DISK}3 83 | fi 84 | if [[ "${FS}" == "btrfs" ]]; then 85 | mkfs.vfat -F32 -n "EFIBOOT" ${partition2} 86 | mkfs.btrfs -L ROOT ${partition3} -f 87 | mount -t btrfs ${partition3} /mnt 88 | subvolumesetup 89 | elif [[ "${FS}" == "ext4" ]]; then 90 | mkfs.vfat -F32 -n "EFIBOOT" ${partition2} 91 | mkfs.ext4 -L ROOT ${partition3} 92 | mount -t ext4 ${partition3} /mnt 93 | elif [[ "${FS}" == "luks" ]]; then 94 | mkfs.vfat -F32 -n "EFIBOOT" ${partition2} 95 | echo -ne "${LUKS_PASSWORD}" | cryptsetup -y -v luksFormat ${partition3} - 96 | echo -ne "${LUKS_PASSWORD}" | cryptsetup open ${partition3} ROOT - 97 | mkfs.btrfs -L ROOT ${partition3} 98 | mount -t btrfs ${partition3} /mnt 99 | subvolumesetup 100 | echo ENCRYPTED_PARTITION_UUID=$(blkid -s UUID -o value ${partition3}) >> $CONFIGS_DIR/setup.conf 101 | fi 102 | mkdir -p /mnt/boot/efi 103 | mount -t vfat -L EFIBOOT /mnt/boot/ 104 | if ! grep -qs '/mnt' /proc/mounts; then 105 | echo "Drive is not mounted, cannot continue." 106 | echo "Rebooting in 3 seconds..." && sleep 1 107 | echo "Rebooting in 2 seconds..." && sleep 1 108 | echo "Rebooting in 1 second..." && sleep 1 109 | reboot now 110 | fi 111 | echo -ne " 112 | _________________________________________________________ 113 | Arch Install on Main Drive / 114 | _______________________________________________________/ 115 | 116 | " 117 | pacstrap /mnt base base-devel linux linux-firmware sudo archlinux-keyring wget libnewt --noconfirm --needed 118 | echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf 119 | cp -R ${SCRIPT_DIR} /mnt/root/ArchX 120 | cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist 121 | genfstab -L /mnt >> /mnt/etc/fstab 122 | echo " 123 | Generated /etc/fstab: 124 | " 125 | cat /mnt/etc/fstab 126 | echo -ne " 127 | _____________________________________________________________ 128 | GRUB BIOS Bootloader Install & Check / 129 | ___________________________________________________________/ 130 | 131 | " 132 | if [[ ! -d "/sys/firmware/efi" ]]; then 133 | grub-install --boot-directory=/mnt/boot ${DISK} 134 | else 135 | pacstrap /mnt efibootmgr --noconfirm --needed 136 | fi 137 | echo -ne " 138 | _____________________________________________________________ 139 | Checking for low memory systems <8G / 140 | ___________________________________________________________/ 141 | 142 | " 143 | TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') 144 | if [[ $TOTAL_MEM -lt 8000000 ]]; then 145 | mkdir -p /mnt/opt/swap 146 | chattr +C /mnt/opt/swap 147 | dd if=/dev/zero of=/mnt/opt/swap/swapfile bs=1M count=2048 status=progress 148 | chmod 600 /mnt/opt/swap/swapfile # set permissions. 149 | chown root /mnt/opt/swap/swapfile 150 | mkswap /mnt/opt/swap/swapfile 151 | swapon /mnt/opt/swap/swapfile 152 | echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab 153 | fi 154 | echo -ne " 155 | _____________________________________________________________ 156 | SYSTEM READY FOR 1-setup.sh / 157 | ___________________________________________________________/ 158 | 159 | " 160 | -------------------------------------------------------------------------------- /scripts/1-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | clear 3 | echo -ne " 4 | _____ __ __ 5 | / _ \ _______ ____ | |__ ______ | | __ ____ ______ 6 | / /_\ \ \_ __ \_/ ___\ | | \ \____ \ | |/ / / ___\ / ___/ 7 | / | \ | | \/\ \___ | Y \ | |_> >| < / /_/ >\___ \ 8 | \____|__ / |__| \___ >|___| / | __/ |__|_ \ \___ //____ > 9 | \/ \/ \/ |__| \//_____/ \/ 10 | _____________________________________ 11 | \ Automated Arch Linux Installer / 12 | \ SCRIPTHOME: ArchX / 13 | \_______________________________/ 14 | 15 | " 16 | source $HOME/ArchX/configs/setup.conf 17 | echo -ne " 18 | ________________________________________________ 19 | Network Setup / 20 | ______________________________________________/ 21 | 22 | " 23 | pacman -S --noconfirm --needed networkmanager dhclient 24 | systemctl enable --now NetworkManager 25 | echo -ne " 26 | _____________________________________________________________ 27 | Setting up mirrors for optimal download / 28 | ___________________________________________________________/ 29 | 30 | " 31 | pacman -S --noconfirm --needed reflector pacman-contrib curl rsync grub arch-install-scripts git 32 | cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak 33 | nc=$(grep -c ^processor /proc/cpuinfo) 34 | echo -nE " 35 | _______________________________________________________________ 36 | changing the makeflags cores. Aswell as / 37 | changing the compression settings. / 38 | ____________________________________________________________/ 39 | You have "$nc" cores. 40 | 41 | " 42 | TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') 43 | if [[ $TOTAL_MEM -gt 8000000 ]]; then 44 | sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j$nc\"/g" /etc/makepkg.conf 45 | sed -i "s/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g" /etc/makepkg.conf 46 | fi 47 | echo -ne " 48 | ___________________________________________________________ 49 | Setup Language to US and set locale / 50 | _________________________________________________________/ 51 | 52 | " 53 | sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen 54 | locale-gen 55 | sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers 56 | sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers 57 | sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf 58 | sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf 59 | pacman -Sy --noconfirm 60 | echo -ne " 61 | _____________________________________________________ 62 | Installing Base System / 63 | ___________________________________________________/ 64 | 65 | " 66 | sed -n '/'$INSTALL_TYPE'/q;p' $HOME/ArchX/pkg-files/pacman-pkgs.txt | while read line 67 | do 68 | if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then 69 | continue 70 | fi 71 | echo "INSTALLING: ${line}" 72 | sudo pacman -S --noconfirm --needed ${line} 73 | done 74 | echo -ne " 75 | ________________________________________________________ 76 | Installing Microcode / 77 | ______________________________________________________/ 78 | 79 | " 80 | proc_type=$(lscpu) 81 | if grep -E "GenuineIntel" <<< ${proc_type}; then 82 | echo "Installing Intel microcode" 83 | pacman -S --noconfirm --needed intel-ucode 84 | proc_ucode=intel-ucode.img 85 | elif grep -E "AuthenticAMD" <<< ${proc_type}; then 86 | echo "Installing AMD microcode" 87 | pacman -S --noconfirm --needed amd-ucode 88 | proc_ucode=amd-ucode.img 89 | fi 90 | echo -ne " 91 | _______________________________________________________ 92 | Installing Graphics Drivers / 93 | _____________________________________________________/ 94 | 95 | " 96 | gpu_type=$(lspci) 97 | if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then 98 | pacman -S --noconfirm --needed nvidia-dkms nvidia-utils xorg-server-devel opencl-nvidia && nvidia-xconfig vulkan-tools vulkan-icd-loader vulkan-nouveau 99 | elif lspci | grep 'VGA' | grep -E "Radeon|AMD"; then 100 | pacman -S --noconfirm --needed xf86-video-amdgpu 101 | elif grep -E "Integrated Graphics Controller" <<< ${gpu_type}; then 102 | pacman -S --noconfirm --needed libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa 103 | elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; then 104 | pacman -S --needed --noconfirm libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa 105 | fi 106 | if ! source $HOME/ArchX/configs/setup.conf; then 107 | while true 108 | do 109 | read -p "Please enter username:" username 110 | if [[ "${username,,}" =~ ^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$ ]] 111 | then 112 | break 113 | fi 114 | echo "Incorrect username." 115 | done 116 | echo "username=${username,,}" >> ${HOME}/ArchX/configs/setup.conf 117 | read -p "Please enter password:" password 118 | echo "password=${password,,}" >> ${HOME}/ArchX/configs/setup.conf 119 | while true 120 | do 121 | read -p "Please name your machine:" name_of_machine 122 | if [[ "${name_of_machine,,}" =~ ^[a-z][a-z0-9_.-]{0,62}[a-z0-9]$ ]] 123 | then 124 | break 125 | fi 126 | read -p "Hostname doesn't seem correct. Do you still want to save it? (y/n)" force 127 | if [[ "${force,,}" = "y" ]] 128 | then 129 | break 130 | fi 131 | done 132 | echo "NAME_OF_MACHINE=${name_of_machine,,}" >> ${HOME}/ArchX/configs/setup.conf 133 | fi 134 | echo -ne " 135 | _____________________________________________ 136 | Adding User / 137 | ___________________________________________/ 138 | 139 | " 140 | if [ $(whoami) = "root" ]; then 141 | groupadd libvirt 142 | groupadd dialout 143 | groupadd kvm 144 | useradd -m -G wheel,kvm,libvirt,power,video,input,dialout -s /bin/bash $USERNAME 145 | echo "$USERNAME created, home directory created, added to wheel and libvirt group, default shell set to /bin/bash" 146 | echo "$USERNAME:$PASSWORD" | chpasswd 147 | echo "$USERNAME password set" 148 | cp -R $HOME/ArchX /home/$USERNAME/ 149 | chown -R $USERNAME: /home/$USERNAME/ArchX 150 | echo "ArchX copied to home directory" 151 | echo $NAME_OF_MACHINE > /etc/hostname 152 | else 153 | echo "You are already a user proceed with aur installs" 154 | fi 155 | if [[ ${FS} == "luks" ]]; then 156 | sed -i 's/filesystems/encrypt filesystems/g' /etc/mkinitcpio.conf 157 | mkinitcpio -p linux 158 | fi 159 | echo -ne " 160 | ___________________________________________________ 161 | SYSTEM READY FOR 2-user.sh / 162 | _________________________________________________/ 163 | 164 | " 165 | -------------------------------------------------------------------------------- /scripts/2-user.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | clear 3 | echo -nE " 4 | _____ __ ____ ___ 5 | / _ \ _______ ____ | |__ | | \ ______ ____ _______ 6 | / /_\ \ \_ __ \_/ ___\ | | \ | | // ___/_/ __ \ \_ __ \ 7 | / | \ | | \/\ \___ | Y \ | | / \___ \ \ ___/ | | \/ 8 | \____|__ / |__| \___ >|___| / |______/ /____ > \___ > |__| 9 | \/ \/ \/ \/ \/ 10 | _____________________________________ 11 | \ Automated Arch Linux Installer / 12 | \ SCRIPTHOME: ArchX / 13 | \_______________________________/ 14 | 15 | Installing AUR Softwares 16 | 17 | " 18 | source $HOME/ArchX/configs/setup.conf 19 | cd ~ 20 | mkdir "/home/$USERNAME/.cache" 21 | touch "/home/$USERNAME/.cache/zshhistory" 22 | sed -n '/'$INSTALL_TYPE'/q;p' ~/ArchX/pkg-files/${DESKTOP_ENV}.txt | while read line 23 | do 24 | if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then 25 | continue 26 | fi 27 | if [[ ${line:0:1} == '#' ]]; then 28 | continue 29 | fi 30 | echo "INSTALLING: ${line}" 31 | sudo pacman -S --noconfirm --needed ${line} 32 | done 33 | 34 | if [[ ! $AUR_HELPER == none ]]; then 35 | cd ~ 36 | git clone "https://aur.archlinux.org/$AUR_HELPER.git" 37 | cd ~/$AUR_HELPER 38 | makepkg --noconfirm -si 2>&1 >/dev/null 39 | sed -n '/'$INSTALL_TYPE'/q;p' ~/ArchX/pkg-files/aur-pkgs.txt | while read line 40 | do 41 | if [[ ${line} == '--END OF MINIMAL INSTALL--' ]]; then 42 | continue 43 | fi 44 | if [[ ${line:0:1} == '#' ]]; then 45 | continue 46 | fi 47 | echo "INSTALLING: ${line}" 48 | $AUR_HELPER -S --quiet --noconfirm --needed ${line} 49 | done 50 | fi 51 | export PATH=$PATH:~/.local/bin 52 | if [[ $INSTALL_TYPE == "FULL" ]]; then 53 | curl -s https://raw.githubusercontent.com/X3ric/usr/main/.local/share/bin/wifi-menu -o ~/wifi-menu.sh 54 | sudo chmod +x ~/wifi-menu.sh 55 | cp -r ~/ArchX/scripts/${DESKTOP_ENV}.sh ~/ 56 | cp -r ~/ArchX/configs/.bash_profile ~/ 57 | else 58 | curl -s https://raw.githubusercontent.com/X3ric/usr/main/.local/share/bin/wifi-menu -o ~/wifi-menu.sh 59 | sudo chmod +x ~/wifi-menu.sh 60 | cp -r ~/ArchX/scripts/${DESKTOP_ENV}-minimal.sh ~/ 61 | cp -r ~/ArchX/configs/.bash_profile ~/ 62 | fi 63 | echo -ne " 64 | __________________________________________________________ 65 | SYSTEM READY FOR 3-post-setup.sh / 66 | ________________________________________________________/ 67 | 68 | " 69 | exit 70 | -------------------------------------------------------------------------------- /scripts/3-post-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | clear 3 | echo -ne " 4 | _________ __ 5 | / _____/ ____ _______ ___ __|__| _____ ____ ______ 6 | \_____ \ / __ \ \_ __ \ \ \/ /| |/ ___\/ __ \ / ___/ 7 | / \ \ ___/ | | \/ \ / | |\ \___\ __/ \___ \ 8 | /_______ / \___ > |__| \_/ |__| \___ >\___ >/___ > 9 | \/ \/ \/ \/ \/ 10 | _____________________________________ 11 | \ Automated Arch Linux Installer / 12 | \ SCRIPTHOME: ArchX / 13 | \_______________________________/ 14 | 15 | Final Setup and Configurations 16 | GRUB EFI Bootloader Install & Check 17 | 18 | " 19 | source ${HOME}/ArchX/configs/setup.conf 20 | if [[ -d "/sys/firmware/efi" ]]; then 21 | grub-install --efi-directory=/boot ${DISK} 22 | fi 23 | echo -ne " 24 | ___________________________________________________________ 25 | Creating Grub Boot Menu Themed / 26 | _________________________________________________________/ 27 | 28 | " 29 | if [[ "${FS}" == "luks" ]]; then 30 | 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 31 | fi 32 | sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& os-prober/' /etc/default/grub 33 | sed -i '/^#GRUB_DISABLE_OS_PROBER=/s/^#//' /etc/default/grub 34 | sed -i 's/^\(GRUB_DEFAULT=\).*/\1saved/' /etc/default/grub 35 | sed -i 's/^\#\(GRUB_SAVEDEFAULT=\).*/\1true/' /etc/default/grub 36 | sed -i 's/quiet//g' /etc/default/grub 37 | sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=3/' /etc/default/grub 38 | echo -e "Installing PolyDark Grub theme..." 39 | THEME_DIR="/boot/grub/themes" 40 | THEME_NAME="PolyDark" 41 | echo -e "Creating the theme directory..." 42 | mkdir -p "${THEME_DIR}/${THEME_NAME}" 43 | echo -e "Copying the theme..." 44 | cd ${HOME}/ArchX 45 | cp -a configs${THEME_DIR}/${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME} 46 | echo -e "Backing up Grub config..." 47 | cp -an /etc/default/grub /etc/default/grub.bak 48 | echo -e "Setting the theme as the default..." 49 | grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub 50 | echo "GRUB_THEME=\"${THEME_DIR}/${THEME_NAME}/theme.txt\"" >> /etc/default/grub 51 | echo -e "Updating grub..." 52 | grub-mkconfig -o /boot/grub/grub.cfg 53 | echo -e "All set!" 54 | echo -ne " 55 | ______________________________________________________ 56 | Enabling Essential Services / 57 | ____________________________________________________/ 58 | 59 | " 60 | systemctl enable cups.service 61 | echo " Cups enabled" 62 | ntpd -qg 63 | systemctl enable ntpd.service 64 | echo " NTP enabled" 65 | systemctl enable NetworkManager.service 66 | echo " NetworkManager enabled" 67 | systemctl enable bluetooth 68 | echo " Bluetooth enabled" 69 | systemctl enable avahi-daemon.service 70 | echo " Avahi enabled" 71 | 72 | if [[ "${FS}" == "luks" || "${FS}" == "btrfs" ]]; then 73 | echo -ne " 74 | ____________________________________________________ 75 | Creating Snapper Config / 76 | __________________________________________________/ 77 | 78 | " 79 | SNAPPER_CONF="$HOME/ArchX/configs/etc/snapper/configs/root" 80 | mkdir -p /etc/snapper/configs/ 81 | cp -rfv ${SNAPPER_CONF} /etc/snapper/configs/ 82 | SNAPPER_CONF_D="$HOME/ArchX/configs/etc/conf.d/snapper" 83 | mkdir -p /etc/conf.d/ 84 | cp -rfv ${SNAPPER_CONF_D} /etc/conf.d/ 85 | fi 86 | echo -ne " 87 | ____________________________________________________ 88 | Setting etc configs / 89 | __________________________________________________/ 90 | 91 | " 92 | cp -rfv "$HOME/ArchX/configs/etc/samba" /etc/ 93 | cp -rfv "$HOME/ArchX/configs/etc/X11" /etc/ 94 | cp -rfv "$HOME/ArchX/configs/etc/sysctl.d" /etc/ 95 | echo -ne " 96 | ________________________________________ 97 | Cleaning / 98 | ______________________________________/ 99 | 100 | " 101 | sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers 102 | sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers 103 | sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers 104 | sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers 105 | rm -r $HOME/ArchX 106 | rm -r /home/$USERNAME/ArchX 107 | rm -r /home/$USERNAME/yay 108 | cd $pwd 109 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | ### Scripts Folder 2 | 3 | This directory contains scripts needed for installation: 4 | 5 | - [`0-preinstall.sh`](0-preinstall.sh): Prepares the disk by clearing existing data and creating the necessary filesystem for the installation process. 6 | 7 | - [`1-setup.sh`](1-setup.sh): Installs the Linux kernel and sets up essential configurations like network settings, locale, language, etc. 8 | 9 | - [`2-user.sh`](2-user.sh): Installs additional packages required for the chosen desktop environment (`${DESKTOP_ENV}`). It reads package lists from `${DESKTOP_ENV}.txt` and `aur-pkgs.txt` to install standard and AUR (Arch User Repository) packages, respectively. 10 | 11 | - [`3-post-setup.sh`](3-post-setup.sh): Handles post-setup tasks, including configuring the GRUB bootloader, enabling essential services, tweaking system files, and performing cleanup operations for a smooth functioning system. 12 | 13 | - [`awesome.sh`](awesome.sh): Executes during the first boot of the installed distribution. It applies final touches, patch fixes, or customizations for awesome. 14 | 15 | - [`awesome-minimal.sh`](awesome-minimal.sh): Executes during the first boot of the installed distribution. It applies final touches, patch fixes, or customizations for awesome minimal. 16 | 17 | - [`startup.sh`](startup.sh): Serves as an interactive menu before starting the ArchX installation. Allows users to make initial configuration choices. Once selections are made, the ArchX installation process starts, applying the chosen configurations and settings. 18 | 19 | ### Make a new one? 20 | 21 | Additionally you can create a new installation choice. Let's say you want to create an option for 22 | `${name}.sh` (replace `${name}` with the name of your choice, e.g., `awesome.sh`). This script will be placed in the `scripts` directory use `awesome.sh` as a base and uncomment line 24 and replace $wm with your wanted wm to make also change last exec line in the xinitrc 23 | because as default i not use a login manager i prefer tty. 24 | 25 | Create a new file named `${name}.txt` (replace `${name}` with the name of your choice, e.g., `awesome.txt`). This file should be located in the `/pkg-files` directory. It will contain a list of essential packages for the minimal installation option and also should add the line `--END OF MINIMAL INSTALL--` to the list of packages. This addition helps distinguish between essential packages for a minimal installation and additional ones for a full desktop environment setup. 26 | -------------------------------------------------------------------------------- /scripts/awesome-minimal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$EUID" -ne 0 ]]; then 4 | echo -nE " 5 | ___________________________ 6 | Awesome post install / 7 | _________________________/ 8 | 9 | " 10 | if ! ping -c 1 google.com &> /dev/null; then echo "No internet connection. Running command..." && sudo ./wifi-menu.sh; else echo "Internet connection available. Skipping command."; fi 11 | sudo ./awesome-minimal.sh 12 | else 13 | # removing uneeded etc "minimal" 14 | rm -rf /etc/X11/xinit/xinitrc.d/30-gtk3-nocsd.sh 15 | rm -rf /etc/X11/xinit/xinitrcterm 16 | 17 | echo -e "if [[ ! -z /dev/tty1 ]]; then\n startx\nfi" > ./.bash_profile 18 | 19 | echo "Cange password for root to login with su root" 20 | passwd root 21 | choice=$(logname) 22 | read -p 'Layout? us,it: ' pos 23 | localectl set-keymap --no-ask-password $pos 24 | localectl set-x11-keymap --no-ask-password $pos 25 | timezone="$(curl -s --fail https://ipapi.co/timezone)" 26 | timedatectl --no-ask-password set-timezone ${timezone} 27 | timedatectl --no-ask-password set-ntp 1 28 | localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" 29 | #ln -s /usr/share/zoneinfo/${timezone} /etc/localtime 30 | loadkeys $pos 31 | 32 | read -p 'Is laptop? y[n]: ' lp 33 | if [[ $lp == "y" ]]; then 34 | pacman -S --needed --noconfirm sof-firmware tlp acpi acpid 35 | sed -i -E 's/^#(SOUND_POWER_SAVE_ON_AC=).*/\10/; s/^#(START_CHARGE_THRESH_BAT[01]=).*/\185/; s/^#(STOP_CHARGE_THRESH_BAT[01]=).*/\190/' /etc/tlp.conf 36 | systemctl enable tlp.service 37 | fi 38 | 39 | gpu_type=$(lspci) 40 | if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then 41 | yay --noconfirm --needed envycontrol 42 | envycontrol -s nvidia --force-comp 43 | fi 44 | 45 | #xset r rate 660 25 #Default one 46 | xset r rate 560 25 #Input speed 47 | 48 | # Cleanup unnecessary packages 49 | pacman -Rns --noconfirm $(pacman -Qdtq) 50 | paccache -r 51 | 52 | sysctl --system 53 | 54 | chown -R $choice:$choice /home/$choice 55 | chmod 755 /home/$choice 56 | rm -R /home/$choice/awesome-minimal.sh 57 | rm -R /home/$choice/wifi-menu.sh 58 | 59 | reboot 60 | fi 61 | -------------------------------------------------------------------------------- /scripts/awesome.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ "$EUID" -ne 0 ]]; then 3 | echo -nE " 4 | ___________________________ 5 | Awesome post install / 6 | _________________________/ 7 | 8 | " 9 | if ! ping -c 1 google.com &> /dev/null; then echo "No internet connection. Running command..." && sudo ./wifi-menu.sh; else echo "Internet connection available. Skipping command."; fi 10 | echo "picomx install" 11 | curl -s https://raw.githubusercontent.com/X3ric/picom/next/install | bash 12 | echo "ctpvx install" 13 | curl -s https://raw.githubusercontent.com/X3ric/ctpv/master/install | bash 14 | sudo ./awesome.sh 15 | else 16 | echo -nE " 17 | ___________________________ 18 | Awesome final install / 19 | _________________________/ 20 | 21 | " 22 | #sed -i "\$s|^exec.*|exec $wm|" "/etc/X11/xinit/xinitrc" # replace $wm with the wm you want 23 | echo "Change password for root to login with su root" 24 | passwd root 25 | choice=$(logname) 26 | 27 | read -p 'Layout? us,it: ' pos 28 | localectl set-keymap --no-ask-password $pos 29 | localectl set-x11-keymap --no-ask-password $pos 30 | timezone="$(curl -s --fail https://ipapi.co/timezone)" 31 | timedatectl --no-ask-password set-timezone ${timezone} 32 | timedatectl --no-ask-password set-ntp 1 33 | localectl --no-ask-password set-locale LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" 34 | #ln -s /usr/share/zoneinfo/${timezone} /etc/localtime 35 | loadkeys $pos 36 | 37 | read -p 'Is laptop? y[n]: ' lp 38 | if [[ $lp == "y" ]]; then 39 | pacman -S --needed --noconfirm sof-firmware tlp acpi acpid 40 | sed -i -E 's/^#(SOUND_POWER_SAVE_ON_AC=).*/\10/; s/^#(START_CHARGE_THRESH_BAT[01]=).*/\185/; s/^#(STOP_CHARGE_THRESH_BAT[01]=).*/\190/' /etc/tlp.conf 41 | systemctl enable tlp.service 42 | fi 43 | 44 | gpu_type=$(lspci) 45 | if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then 46 | envycontrol -s nvidia --force-comp 47 | fi 48 | 49 | sudo systemctl enable gpm.service 50 | 51 | #xset r rate 660 25 #Default one 52 | xset r rate 160 60 #Input speed 53 | 54 | # Cleanup unnecessary packages 55 | pacman -Rns --noconfirm $(pacman -Qdtq) 56 | paccache -r 57 | 58 | sysctl --system 59 | 60 | [[ ! -f "/usr/lib/libgtk3-nocsd.so.0" ]] && git clone https://github.com/PCMan/gtk3-nocsd && cd gtk3-nocsd && make && sudo make install && cd .. && rm -rf gtk3-nocsd && sudo cp /usr/local/lib/libgtk3-nocsd.so.0 /usr/lib/libgtk3-nocsd.so.0 61 | 62 | cd /home/$choice/.cache 63 | git clone https://github.com/X3ric/usr 64 | chmod -R +x /home/$choice/.cache/usr/ 65 | cp -r -a /home/$choice/.cache/usr/. /home/$choice/ 66 | rm -R /home/$choice/README.md 67 | rm -R /home/$choice/LICENSE 68 | rm -Rf /home/$choice/.git/ 69 | cd /home/$choice/ 70 | mkdir -p /home/$choice/.icons/default/ 71 | ln -s /home/$choice/.local/share/icons/cz-Hickson-Black/cursors/ /home/$choice/.icons/default/cursors 72 | curl -s -O https://raw.githubusercontent.com/x3ric/usr/main/.local/share/bin/desktop-hide && chmod +x ./desktop-hide && ./desktop-hide && rm -rf ./desktop-hide 73 | chown -R $choice:$choice /home/$choice 74 | chmod 755 /home/$choice 75 | rm -R /home/$choice/awesome.sh 76 | rm -R /home/$choice/wifi-menu.sh 77 | rm -R /home/$choice/.bash_profile 78 | rm -R /home/$choice/.bash_logout 79 | rm -R /home/$choice/.bash_history 80 | echo "export ZDOTDIR=~/.local/zsh" | sudo tee /etc/zsh/zshenv 81 | rm -rf ~/.zshenv 82 | sudo touch /home/$choice/.cache/ttywal 83 | sudo touch /etc/vconsole.conf 84 | sudo chmod a+rw /etc/vconsole.conf 85 | /home/$choice/.local/share/bin/ttywal 86 | chsh $choice -s /bin/zsh 87 | reboot 88 | fi 89 | -------------------------------------------------------------------------------- /scripts/startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | CONFIG_FILE=$CONFIGS_DIR/setup.conf 3 | if [ ! -f $CONFIG_FILE ]; then 4 | touch -f $CONFIG_FILE 5 | fi 6 | set_option() { 7 | if grep -Eq "^${1}.*" $CONFIG_FILE; then 8 | sed -i -e "/^${1}.*/d" $CONFIG_FILE 9 | fi 10 | echo "${1}=${2}" >>$CONFIG_FILE 11 | } 12 | set_password() { 13 | read -rs -p "Please enter password: " PASSWORD1 14 | echo -ne "\n" 15 | read -rs -p "Please re-enter password: " PASSWORD2 16 | echo -ne "\n" 17 | if [[ "$PASSWORD1" == "$PASSWORD2" ]]; then 18 | set_option "$1" "$PASSWORD1" 19 | else 20 | echo -ne "ERROR! Passwords do not match. \n" 21 | set_password 22 | fi 23 | } 24 | root_check() { 25 | if [[ "$(id -u)" != "0" ]]; then 26 | echo -ne "ERROR! This script must be run under the 'root' user!\n" 27 | exit 0 28 | fi 29 | } 30 | docker_check() { 31 | if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then 32 | echo -ne "ERROR! Docker container is not supported (at the moment)\n" 33 | exit 0 34 | elif [[ -f /.dockerenv ]]; then 35 | echo -ne "ERROR! Docker container is not supported (at the moment)\n" 36 | exit 0 37 | fi 38 | } 39 | arch_check() { 40 | if [[ ! -e /etc/arch-release ]]; then 41 | echo -ne "ERROR! This script must be run in Arch Linux!\n" 42 | exit 0 43 | fi 44 | } 45 | pacman_check() { 46 | if [[ -f /var/lib/pacman/db.lck ]]; then 47 | echo "ERROR! Pacman is blocked." 48 | echo -ne "If not running remove /var/lib/pacman/db.lck.\n" 49 | exit 0 50 | fi 51 | } 52 | background_checks() { 53 | root_check 54 | arch_check 55 | pacman_check 56 | docker_check 57 | } 58 | select_option() { 59 | ESC=$( printf "\033") 60 | cursor_blink_on() { printf "$ESC[?25h"; } 61 | cursor_blink_off() { printf "$ESC[?25l"; } 62 | cursor_to() { printf "$ESC[$1;${2:-1}H"; } 63 | print_option() { printf "$2 $1 "; } 64 | print_selected() { printf "$2 $ESC[7m $1 $ESC[27m"; } 65 | get_cursor_row() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; } 66 | get_cursor_col() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${COL#*[}; } 67 | key_input() { 68 | local key 69 | IFS= read -rsn1 key 2>/dev/null >&2 70 | if [[ $key = "" ]]; then echo enter; fi; 71 | if [[ $key = $'\x20' ]]; then echo space; fi; 72 | if [[ $key = "k" ]]; then echo up; fi; 73 | if [[ $key = "j" ]]; then echo down; fi; 74 | if [[ $key = "h" ]]; then echo left; fi; 75 | if [[ $key = "l" ]]; then echo right; fi; 76 | if [[ $key = "a" ]]; then echo all; fi; 77 | if [[ $key = "n" ]]; then echo none; fi; 78 | if [[ $key = $'\x1b' ]]; then 79 | read -rsn2 key 80 | if [[ $key = [A || $key = k ]]; then echo up; fi; 81 | if [[ $key = [B || $key = j ]]; then echo down; fi; 82 | if [[ $key = [C || $key = l ]]; then echo right; fi; 83 | if [[ $key = [D || $key = h ]]; then echo left; fi; 84 | fi 85 | } 86 | print_options_multicol() { 87 | local curr_col=$1 88 | local curr_row=$2 89 | local curr_idx=0 90 | local idx=0 91 | local row=0 92 | local col=0 93 | curr_idx=$(( $curr_col + $curr_row * $colmax )) 94 | for option in "${options[@]}"; do 95 | row=$(( $idx/$colmax )) 96 | col=$(( $idx - $row * $colmax )) 97 | cursor_to $(( $startrow + $row + 1)) $(( $offset * $col + 1)) 98 | if [ $idx -eq $curr_idx ]; then 99 | print_selected "$option" 100 | else 101 | print_option "$option" 102 | fi 103 | ((idx++)) 104 | done 105 | } 106 | for opt; do printf "\n"; done 107 | local return_value=$1 108 | local lastrow=`get_cursor_row` 109 | local lastcol=`get_cursor_col` 110 | local startrow=$(($lastrow - $#)) 111 | local startcol=1 112 | local lines=$( tput lines ) 113 | local cols=$( tput cols ) 114 | local colmax=$2 115 | local offset=$(( $cols / $colmax )) 116 | local size=$4 117 | shift 4 118 | trap "cursor_blink_on; stty echo; printf '\n'; exit" 2 119 | cursor_blink_off 120 | local active_row=0 121 | local active_col=0 122 | while true; do 123 | print_options_multicol $active_col $active_row 124 | case `key_input` in 125 | enter) break;; 126 | up) ((active_row--)); 127 | if [ $active_row -lt 0 ]; then active_row=0; fi;; 128 | down) ((active_row++)); 129 | if [ $active_row -ge $(( ${#options[@]} / $colmax )) ]; then active_row=$(( ${#options[@]} / $colmax )); fi;; 130 | left) ((active_col=$active_col - 1)); 131 | if [ $active_col -lt 0 ]; then active_col=0; fi;; 132 | right) ((active_col=$active_col + 1)); 133 | if [ $active_col -ge $colmax ]; then active_col=$(( $colmax - 1 )) ; fi;; 134 | esac 135 | done 136 | cursor_to $lastrow 137 | printf "\n" 138 | cursor_blink_on 139 | return $(( $active_col + $active_row * $colmax )) 140 | } 141 | logo () { 142 | sleep 4s 143 | clear 144 | echo -ne " 145 | _____ __ 146 | / _ \ _______ ____ | |___ 147 | / /_\ \ \_ __ \/ ___\ | | \ 148 | / | \ | | \/\ \___ | Y / 149 | \____|__ / |__| \___ >|___| / 150 | \/ \/ \/ 151 | ________________________________________________________________ 152 | Please select settings for your system / 153 | ______________________________________________________________/ 154 | 155 | " 156 | } 157 | filesystem () { 158 | echo -ne " 159 | Please Select your file system for both boot and root 160 | " 161 | options=("btrfs" "ext4" "luks" "exit") 162 | select_option $? 1 "${options[@]}" 163 | case $? in 164 | 0) set_option FS btrfs;; 165 | 1) set_option FS ext4;; 166 | 2) 167 | set_password "LUKS_PASSWORD" 168 | set_option FS luks 169 | ;; 170 | 3) exit ;; 171 | *) echo "Wrong option please select again"; filesystem;; 172 | esac 173 | } 174 | timezone () { 175 | time_zone="$(curl -s --fail https://ipapi.co/timezone)" 176 | echo -ne " 177 | System detected your timezone to be '$time_zone' \n" 178 | echo -ne " Is this correct? 179 | " 180 | options=("Yes" "No") 181 | select_option $? 1 "${options[@]}" 182 | case ${options[$?]} in 183 | y|Y|yes|Yes|YES) 184 | echo "${time_zone} set as timezone" 185 | set_option TIMEZONE $time_zone;; 186 | n|N|no|NO|No) 187 | echo "Please enter your desired timezone e.g. Europe/London :" 188 | read new_timezone 189 | echo "${new_timezone} set as timezone" 190 | set_option TIMEZONE $new_timezone;; 191 | *) echo "Wrong option. Try again";timezone;; 192 | esac 193 | } 194 | keymap () { 195 | #clear 196 | #echo -ne " 197 | # Please select key board layout from this list" 198 | #options=(us by ca cf cz de dk es et fa fi fr gr hu il it lt lv mk nl no pl ro ru sg tr ua uk) 199 | #select_option $? 4 "${options[@]}" 200 | #keymap=${options[$?]} 201 | #echo -ne "Your key boards layout: ${keymap}\n" 202 | #set_option KEYMAP $keymap 203 | set_option KEYMAP us 204 | } 205 | diskpart () { 206 | echo -ne " 207 | __ __ __ 208 | ____/ /___ | | _____| |_ ____ 209 | / __ / __ \| | / __ \_ __/ ___ \ 210 | / /_/ /\ __/| |_\ __/ | | \ ___/ 211 | \__ / \___ |____/\___ >__| \___ > 212 | \/ \/ \/ \/ 213 | THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK 214 | Please make sure you know what you are doing because 215 | after formating your disk there is no way to get data back 216 | 217 | " 218 | PS3=' 219 | Select the disk to install on: ' 220 | options=($(lsblk -n --output TYPE,KNAME,SIZE | awk '$1=="disk"{print "/dev/"$2"|"$3}')) 221 | select_option $? 1 "${options[@]}" 222 | disk=${options[$?]%|*} 223 | echo -e "\n${disk%|*} selected \n" 224 | set_option DISK ${disk%|*} 225 | disk=${disk#/dev/} 226 | rotation=$(cat "/sys/block/${disk}/queue/rotational") 227 | if [[ "$rotation" -eq 0 ]]; then 228 | set_option MOUNT_OPTIONS "noatime,compress=zstd,ssd,commit=120" 229 | else 230 | set_option MOUNT_OPTIONS "noatime,compress=zstd,commit=120" 231 | fi 232 | } 233 | userinfo () { 234 | read -p "Please enter your username: " username 235 | set_option USERNAME ${username,,} 236 | set_password "PASSWORD" 237 | #read -rep "Please enter your hostname: " nameofmachine # to input the hostname 238 | #set_option NAME_OF_MACHINE $nameofmachine 239 | set_option NAME_OF_MACHINE Arch 240 | } 241 | aurhelper () { 242 | # Let the user choose AUR helper from predefined list 243 | #echo -ne "Please enter your desired AUR helper:\n" 244 | #options=(paru yay picaur aura trizen pacaur none) 245 | #select_option $? 4 "${options[@]}" 246 | #aur_helper=${options[$?]} 247 | #set_option AUR_HELPER $aur_helper 248 | #uncomment before and comment after to menu select aurinstaller 249 | set_option AUR_HELPER yay 250 | } 251 | desktopenv () { 252 | echo -ne "Please select your desired Desktop Enviroment:\n" 253 | options=( `for f in pkg-files/*.txt; do echo "$f" | sed -r "s/.+\/(.+)\..+/\1/;/pkgs/d"; done` ) 254 | select_option $? 4 "${options[@]}" 255 | desktop_env=${options[$?]} 256 | set_option DESKTOP_ENV $desktop_env 257 | } 258 | installtype () { 259 | echo -ne "Please select type of installation:\n\n 260 | Full install: Installs full featured desktop enviroment\n 261 | Minimal Install: Installs only wm\n" 262 | options=(FULL MINIMAL) 263 | select_option $? 4 "${options[@]}" 264 | install_type=${options[$?]} 265 | set_option INSTALL_TYPE $install_type 266 | } 267 | background_checks 268 | logo 269 | userinfo 270 | logo 271 | desktopenv 272 | set_option INSTALL_TYPE MINIMAL 273 | set_option AUR_HELPER NONE 274 | if [[ ! $desktop_env == server ]]; then 275 | logo 276 | aurhelper 277 | logo 278 | installtype 279 | fi 280 | logo 281 | diskpart 282 | logo 283 | filesystem 284 | logo 285 | timezone 286 | logo 287 | #keymap 288 | --------------------------------------------------------------------------------