diff --git a/.archlinux/install-scripts/001-preinstall b/.archlinux/install-scripts/001-preinstall deleted file mode 100755 index fad7dd6f..00000000 --- a/.archlinux/install-scripts/001-preinstall +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# Make partitions -# -# https://wiki.archlinux.org/index.php/Installation_guide - -set -xe - -# Sync the time with one online before doing anything -timedatectl set-ntp true - -# Make a DOS partition table with one primary ext4 partition and -# enable boot for it. Then, create a primary swap partition with -# the remaining disk space. -parted /dev/sda mklabel msdos -parted /dev/sda mkpart primary ext4 1MiB "$DISTSIZE"GiB -parted /dev/sda set 1 boot on -parted /dev/sda mkpart primary linux-swap "$DISTSIZE"GiB 100% - -# Format sda1 with ext4 and sda2 with swap -mkfs -t ext4 /dev/sda1 -mkswap /dev/sda2 - -# Enable the swap partition -swapon /dev/sda2 - -# Mount the newly created file system (/dev/sda1) to /mnt. -mount /dev/sda1 /mnt diff --git a/.archlinux/install-scripts/002-install b/.archlinux/install-scripts/002-install deleted file mode 100755 index 0680c5c7..00000000 --- a/.archlinux/install-scripts/002-install +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# Install packages to new filesystem -# -# https://wiki.archlinux.org/index.php/Installation_guide - -set -xe - -pacstrap /mnt base linux linux-firmware grub fish git polkit rng-tools vim dhcpcd diff --git a/.archlinux/install-scripts/003-configure b/.archlinux/install-scripts/003-configure deleted file mode 100755 index e2d83010..00000000 --- a/.archlinux/install-scripts/003-configure +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# Core system configs -# -# https://wiki.archlinux.org/index.php/Installation_guide - -set -xe - -# Generate the fstab file (so the filesystem is mounted on boot) -genfstab -U /mnt > /mnt/etc/fstab - -# Set the timezone -arch-chroot /mnt ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime - -# Generate /etc/adjtime -arch-chroot /mnt hwclock --systohc - -# Set the hostname -echo "$HOSTNAME" > /mnt/etc/hostname - -# Configure the hosts file (if your system has a permanent IP address, use that instead of 127.0.1.1) -echo "127.0.0.1 localhost" >> /mnt/etc/hosts -echo "::1 localhost" >> /mnt/etc/hosts -echo "127.0.1.1 $HOSTNAME.localdomain $HOSTNAME" >> /mnt/etc/hosts - -# Declare which locales we want to generate and generate them -sed -i '/#en_US.UTF-8 UTF-8/s/^#//g' /mnt/etc/locale.gen -sed -i '/#fr_FR.UTF-8 UTF-8/s/^#//g' /mnt/etc/locale.gen -sed -i '/#ja_JP.UTF-8 UTF-8/s/^#//g' /mnt/etc/locale.gen -arch-chroot /mnt locale-gen - -# Set the system locale to the generated en_US.UTF-8 -echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf - -# Set the tty font to a larger one (same as the default setfont, but larger) -if [ "$HIDPI" == "YES" ]; then - echo "FONT=latarcyrheb-sun32" > /mnt/etc/vconsole.conf -fi - -# Install grub to the primary partition. -arch-chroot /mnt grub-install /dev/sda - -# Prevent the GRUB window from showing at boot, ideal for single OS machines (undo with chroot and mkconfig) -sed -i '/GRUB_TIMEOUT/c\GRUB_TIMEOUT=0' /mnt/etc/default/grub - -# Make the configuration file for grub. -arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg - -# Change the shell of the root account to fish. -arch-chroot /mnt chsh -s /usr/bin/fish diff --git a/.archlinux/install-scripts/004-postinstall b/.archlinux/install-scripts/004-postinstall deleted file mode 100755 index 631bab46..00000000 --- a/.archlinux/install-scripts/004-postinstall +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# Higher-level configs -# -# https://wiki.archlinux.org/index.php/General_recommendations - -set -xe - -# Create the output directories if they don't exist yet -arch-chroot /mnt mkdir -p /etc/systemd/system/multi-user.target.wants -arch-chroot /mnt mkdir -p /etc/systemd/system/sysinit.target.wants - -# Enable the DHCP client daemon service -arch-chroot /mnt ln -sf /usr/lib/systemd/system/dhcpcd.service \ - /etc/systemd/system/multi-user.target.wants/dhcpcd.service - -# Enable the timesync daemon service (sync the time periodically with a remote server) -arch-chroot /mnt ln -sf /usr/lib/systemd/system/systemd-timesyncd.service \ - /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service - -# Enable the rng-tools daemon -arch-chroot /mnt ln -sf /usr/lib/systemd/system/rngd.service \ - /etc/systemd/system/sysinit.target.wants/rngd.service - -# Enable colors in pacman by uncommenting the Color line. -sed -i '/Color/s/^#//g' /mnt/etc/pacman.conf - -# Show package upgrades as a list -sed -i '/VerbosePkgLists/s/^#//g' /mnt/etc/pacman.conf - -# Give users in the wheel group permission to use sudo -echo "%wheel ALL=(ALL) ALL" > /mnt/etc/sudoers.d/01_wheel_all - -# Create a new user account with sudo privileges and the fish shell. -arch-chroot /mnt useradd -m -g users -G wheel -s /usr/bin/fish "$USERNAME" - -# Lock the root account (i.e. disable root login) -arch-chroot /mnt passwd -l root - -# Clone this repository to the user's $HOME -arch-chroot /mnt su "$USERNAME" -c "git clone https://github.com/GloverDonovan/dotfiles /home/$USERNAME/.files" diff --git a/.archlinux/install-scripts/README.md b/.archlinux/install-scripts/README.md deleted file mode 100644 index 6d5bff02..00000000 --- a/.archlinux/install-scripts/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Install Scripts - -Here are my Arch Linux install scripts. They are divided into 4 parts: - -1. Pre-install: Setting up the drive to install Arch on -2. Install: Installing Arch Linux to that drive -3. Configure: Writing some basic low-level config files -4. Post-install: Post-install configuration - -I use `install.sh` to call these scripts with the proper user-generated variables. - -> **Note**: If you do not understand my install scripts, you should follow the [Installation guide][archguide] instead. - -## Usage - -First, download the install script. - -```sh -curl -L https://git.io/.install -o install.sh -``` - -After you have verified that the install script is indeed correct, run it. - -```sh -sh install.sh -``` - -That's it! - -[archguide]: https://wiki.archlinux.org/index.php/Installation_guide diff --git a/.archlinux/install-scripts/install.sh b/.archlinux/install-scripts/install.sh deleted file mode 100755 index efff21f2..00000000 --- a/.archlinux/install-scripts/install.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# Simple Arch Linux install scripts, tailored to my use case. - -# End the script on any errors -set -e - -# Change the working directory to this one -cd "$(dirname "$0")" - -# Download the install scripts if they don't exist yet -URL="https://raw.githubusercontent.com/GloverDonovan/dotfiles/master/.archlinux/install-scripts" -[ -f 001-preinstall ] || curl -L "$URL/001-preinstall" -o 001-preinstall -[ -f 002-install ] || curl -L "$URL/002-install" -o 002-install -[ -f 003-configure ] || curl -L "$URL/003-configure" -o 003-configure -[ -f 004-postinstall ] || curl -L "$URL/004-postinstall" -o 004-postinstall -chmod 755 001-preinstall 002-install 003-configure 004-postinstall - -# Prompt for the required information - -echo -n "Enter the size (in GiB) to give the primary partition: " -read DISTSIZE - -echo -n "Enter a username for the user with sudo rights: " -read USERNAME - -echo -n "Enter a hostname for this machine ($USERNAME@_____): " -read HOSTNAME - -echo -n "Type YES to enable HiDPI support in the virtual console: " -read HIDPI - -echo "-----------------------------------------------------" -echo "Arch Linux will be installed with the settings above." -echo "NOTE: You should not run this script if you do not" -echo " understand what it does. Bad things may happen." -echo -n "Type YES to continue, or Ctrl+C to abort. " -read CONFIRM - -if [ "$CONFIRM" != "YES" ]; then - echo "YES was not given, exiting..." - exit -fi - -echo "=====================================================" -echo "Running install scripts..." - -# Run the install scripts -env DISTSIZE="$DISTSIZE" ./001-preinstall - ./002-install -env HOSTNAME="$HOSTNAME" HIDPI="$HIDPI" ./003-configure -env USERNAME="$USERNAME" ./004-postinstall - -echo "Enter a password for $USERNAME..." -arch-chroot /mnt passwd "$USERNAME" - -echo "=====================================================" -echo "Done. Now reboot into Arch Linux!"