This repository provides my dotfiles and two main scripts:
arch-installer.sh
- An installation script for Arch Linux. See the instructions below for it's use.bootstrap.sh
- Takes an existing Arch, or Debian based system and installs my dotfiles.
Both of these scripts aim to be idempotent - if there is an error, or you want to re-run bootstrap.sh
, there will be no ill-effects.
There are three main classes of machine that the scripts can configure:
Laptop
- Identified by the FQDN ofBens-Laptop-Arch.local
.Server
- Identified by the FQDN ofArchServ.local
.Pi
- Identified byPiTV
,PiRemote
orraspberrypi
host-names.
You can modify the hosts
file in order to add other host-names into these classes.
If none of the above strings are found in the target machine's host-name then a generic install is performed. This includes minimal programs and only dotfiles for command-line programs installed.
Before using the bootstrap script you must have a boot-able Linux install. To quickly get an Arch install with British locale you can use the arch-installer.sh
script
-
This installer requires UEFI boot. To begin ensure that your target disk has the following partitions:
FAT32
partition withesp
andboot
flags (ideally 500MB).ext4
partition for the root.
I prefer to use
fdisk
to do this. You can find more information on the Arch installation guide under the parition disks section.Any partitions you don't mount in the installer will not be touched. Additionally,
systemd-boot
will not overwrite bootloaders from Windows or other Linux distributions if you are reusing the same boot partition. -
Boot from the Arch Installer and connect to a network - if you have Ethernet this will be done automatically, if you have WiFi you should run
iwctl
. -
Mount the partitions that you want to install Arch to in the following hierarchy:
Partition Installer File-system root
/mnt
boot
/mnt/boot
Where
boot
is/dev/sda1
androot
is/dev/sda2
, you would use the following commands:mount /dev/sda2 /mnt mkdir /mnt/boot mount /dev/sda1 /mnt/boot
-
Clone this repository to the installer USB so that you have access to the scripts:
pacman -Sy git git clone https://github.com/bweston6/dotfiles
-
Enter the dotfiles directory you have cloned and run
./arch-installer.sh
. The scripts will prompt you with more instructions:- Ensure to enter a host-name that matches your desired machine type from above.
- There are several checks in place to ensure that there is internet when required and that partitions are mounted.
- Messages generated by the script are in pink text.
-
After booting into the installation you will have a minimal set of programs as
bootstrap.sh
is intended to configure the system. To connect to the internet you can usenmtui
- this is a fairly intuitive ncurses interface forNetworkManager
.
You should note that, for convenience, my personal ssh keys are included and encrypted with Ansible Vault. If you have your own keys you would like to install, then you can place them in the roles/common/files/user/keys/.ssh
folder and delete the existing files.
The script won't try to overwrite keys if they already exist in your .ssh
folder. Therefore, you can create an empty file, to avoid the password prompt, with the following command:
touch ~/.ssh/ed25519