Skip to content

Commit

Permalink
Merge pull request #9 from aldochaconc/readme
Browse files Browse the repository at this point in the history
Readme
  • Loading branch information
aldochaconc authored Feb 5, 2024
2 parents 7603844 + c214904 commit 5460532
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 268 deletions.
8 changes: 4 additions & 4 deletions archcrystal.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Script Name: archcrystal.sh
# Version: 1.2.0
# Version: 1.2.2

set -a
BASE_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
Expand All @@ -17,7 +17,7 @@ source $BASE_DIR/setup.conf
cp -v *.log /mnt/home/$USERNAME

echo -ne "
-------------------------------------------------------------------------
Installation Complete
-------------------------------------------------------------------------
Installation Complete
"
1 change: 0 additions & 1 deletion pkgs/aur.txt

This file was deleted.

48 changes: 0 additions & 48 deletions pkgs/base.txt

This file was deleted.

6 changes: 0 additions & 6 deletions pkgs/desktop-env.txt

This file was deleted.

80 changes: 0 additions & 80 deletions pkgs/dev-env.txt

This file was deleted.

13 changes: 0 additions & 13 deletions pkgs/fonts.txt

This file was deleted.

76 changes: 76 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Archcrystal

## What the heck?

A streamlined automated Arch Linux installation script for personal use.
This script automates all the fundamental processes of installing Arch Linux, including disk partitioning, system setup, user setup, and package installation.
It's a fork of the original ArchTitus script, but with significantly less code and fewer user prompts.

## Motivation

I enjoy breaking things with Linux (honestly).
Someone once told me that if you eyecandy your Linux env, then you must have a lot of time.
That's why this script automates all the basic requirements for a functional, work-ready environment, tailored to my personal Thinkpad T430 laptop.

## Perks

- The script is designed to be as minimal as possible, but functional enough to be used right away.
- The user configuration contains a list of packages by contexts. They have description, read them and be sure of what you're installing.

## How to use

- `archcrystal.sh` is the entry point.
- Check the `archcrystal.sh` file to understand the execution order.
- `setup.conf` contains basic environment configuration.

1. Download an Archlinux iso and run it.
2. Sync pacman & install git using `pacman -Syy git`.
3. Clone archcrystal using `git clone https://github.com/aldochaconc/archcrystal.git`.
4. Grant execute permissions to files with `chmod +x -R ./archcrystal/*`.
5. Run the script using `cd archcrystal` & `./archcrystal.sh`.

Once the script starts, it will prompt for your password.
This is the only prompt that requires user input.
Later, there are "press to continue" prompts to verify what you are installing.

## Things kept from the original script:

- Environment variables management.
- Disk partitioning and disk utilities.
- Mirrorlists and keyring updates.
- Compression settings.
- Graphic drivers auto detection.

### 0-preinstall.sh

- Sets up Pacman optimal mirrors.
- Updates keyring.
- Partitions, formats, and mounts the disk.
Installs base packages on the main drive and pacstraps them.
- Generates the fstab file.
- Installs the appropriate bootloader (GRUB or systemd-boot).

### 1-setup.sh

Arch-chroot operations

- Sets up Network, Pacman mirrorlist, and system clock.
- Language, locale, and keymap setup.
- Enables sudo without password for wheel group and multilib in Pacman.
- Installs base system, microcode, graphics, and audio drivers.
- Adds a new user, sets password, and hostname.

### 2-user.sh

- Installs YAY AUR helper.
- Defines lists of packages to install by context.
- Declares functions to install packages using pacman and yay.
- Sets ZSH as default shell.
- Installs and configures Oh My ZSH.
- Enables installed services.

### 3-post-setup.sh

- Updates grub settings.
- Removes no password sudo rights.
- (Not cleaning due to debugging)
26 changes: 13 additions & 13 deletions scripts/0-preinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
pacman -S --noconfirm --needed reflector rsync grub
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
echo -ne "
-------------------------------------------------------------------------
Setting up $iso mirrors for faster downloads
-------------------------------------------------------------------------
Setting up $iso mirrors for faster downloads
"
reflector -a 48 -c "$iso" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
mkdir /mnt &>/dev/null # Hiding error message if any
echo -ne "
-------------------------------------------------------------------------
Installing Prerequisites
-------------------------------------------------------------------------
Installing Prerequisites
"
pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc
echo -ne "
Expand All @@ -50,9 +50,9 @@ partprobe ${DISK} # reread partition table to ensure it is correct

# make filesystems
echo -ne "
-------------------------------------------------------------------------
Creating Filesystems
-------------------------------------------------------------------------
Creating Filesystems
"
# @description Creates the btrfs subvolumes.
createsubvolumes() {
Expand Down Expand Up @@ -110,11 +110,11 @@ if ! grep -qs '/mnt' /proc/mounts; then
reboot now
fi
echo -ne "
-------------------------------------------------------------------------
Arch Install on Main Drive
-------------------------------------------------------------------------
Arch Install on Main Drive
"
pacstrap /mnt base base-devel linux linux-firmware vim sudo archlinux-keyring wget libnewt --noconfirm --needed
pacstrap /mnt base base-devel linux linux-firmware linux-headers vim sudo archlinux-keyring wget libnewt --noconfirm --needed

cp -R ${BASE_DIR} /mnt/root/archcrystal
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
Expand Down
Loading

0 comments on commit 5460532

Please sign in to comment.