Skip to content

Instantly share code, notes, and snippets.

@davidpeach
Last active July 25, 2025 20:19

Revisions

  1. davidpeach revised this gist Jun 5, 2023. No changes.
  2. davidpeach revised this gist May 29, 2023. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -100,4 +100,14 @@ ssh-copy-id david@192.168.0.???

    # Setup local network stuff
    # Add Include directive to local `.ssh/config` file
    Include ~/.config/ssh.d/*
    Include ~/.config/ssh.d/*

    # Update git remote for dotfiles to use ssh
    git remote set-url origin git@github.com:davidpeach/dotfiles.git







  3. davidpeach revised this gist May 29, 2023. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -47,6 +47,7 @@ stow picom
    stow pictures
    stow ranger
    stow rofi
    stow ssh
    stow task
    stow tmux

    @@ -87,3 +88,16 @@ gh auth login
    # Authentication choose "Paste an authentication token"
    # Paste in your token and hit Enter

    # Setup ssh key
    ssh-keygen -t rsa
    # Keep defaults and create the keys1

    cat ~/.ssh/id_rsa.pub | xclip -sel clipboard
    # Paste into github account ssh area

    # Copy id to my main other workstation
    ssh-copy-id david@192.168.0.???

    # Setup local network stuff
    # Add Include directive to local `.ssh/config` file
    Include ~/.config/ssh.d/*
  4. davidpeach revised this gist May 29, 2023. 1 changed file with 20 additions and 0 deletions.
    20 changes: 20 additions & 0 deletions post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    sudo pacman -S \
    acpid \
    alsa-utils \
    curl \
    xorg-server \
    xorg-xinit \
    @@ -51,6 +52,9 @@ stow tmux

    startx

    git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
    # Install plugins in tmux

    git config --global user.name "<YOUR_NAME>"
    git config --global user.email "<YOUR_EMAIL>"
    git config --global push.autoSetupRemote true
    @@ -67,3 +71,19 @@ gpg --list-secret-keys --keyid-format=long
    # Copy the section of "sec" after "rsa4096"
    git config --global user.signingkey "YOUR_SIGNING_KEY_IDENTIFIER"

    # Tell github about gpg
    gpg --armor --export YOUR_SIGNING_KEY_IDENTIFIER | xclip -sel clipboard
    # paste into new gpg field in github website settings.


    # Setup Github cli
    # Create a legacy access token in github developer settings with your required scopes (i choose all)
    gh auth login
    # Choose GitHub.com
    # Set preferred protocol for git to ssh
    # Say yes to generating ssh key and adding it to account
    # No passphrase
    # give the key a name (not important)
    # Authentication choose "Paste an authentication token"
    # Paste in your token and hit Enter

  5. davidpeach revised this gist May 28, 2023. 1 changed file with 19 additions and 1 deletion.
    20 changes: 19 additions & 1 deletion post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,7 @@ bashtop \
    firefox \
    fontconfig \
    fzf \
    github-cli \
    kitty \
    libnotify \
    lynx \
    @@ -48,4 +49,21 @@ stow rofi
    stow task
    stow tmux

    startx
    startx

    git config --global user.name "<YOUR_NAME>"
    git config --global user.email "<YOUR_EMAIL>"
    git config --global push.autoSetupRemote true
    git config core.fileMode false

    gpg --full-generate-key
    # Choose "1 RSA and RSA"
    # Keysize 4096
    # Key doesn't expire
    # Answer all questions and create key

    # Link gpg key with git
    gpg --list-secret-keys --keyid-format=long
    # Copy the section of "sec" after "rsa4096"
    git config --global user.signingkey "YOUR_SIGNING_KEY_IDENTIFIER"

  6. davidpeach revised this gist May 28, 2023. 1 changed file with 51 additions and 1 deletion.
    52 changes: 51 additions & 1 deletion post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,51 @@
    ..
    sudo pacman -S \
    acpid \
    curl \
    xorg-server \
    xorg-xinit \
    git \
    libva-utils \
    libva-intel-driver \
    i3-wm \
    dmenu \
    dunst \
    bashtop \
    firefox \
    fontconfig \
    fzf \
    kitty \
    libnotify \
    lynx \
    openssh \
    picom \
    ranger \
    rofi \
    stow \
    task \
    tmux \
    unzip \
    xclip

    sudo systemctl enable --now acpid

    git clone https://github.com/davidpeach/dotfiles dots

    rm ~.,bashrc

    stow bashtop
    stow bin
    stow dunst
    stow home
    stow home
    stow i3
    stow kitty
    stow lynx
    stow nvim
    stow picom
    stow pictures
    stow ranger
    stow rofi
    stow task
    stow tmux

    startx
  7. davidpeach renamed this gist May 28, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  8. davidpeach renamed this gist May 28, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. davidpeach revised this gist May 28, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions post-installation.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ..
  10. davidpeach revised this gist May 28, 2023. 1 changed file with 79 additions and 1 deletion.
    80 changes: 79 additions & 1 deletion Installation.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,86 @@
    # These are the steps I take to install a fresh copy of Arch Linux on to my Lenovo Thinkpad T470
    # Spec: i5; 16gb RAM; Integrated Intel 620 graphics; SSD;
    # This will go from the very start up to having a base installation ready to add you chosen window manager or desktop environment.


    # Make a bootable usb stick with the latest version of Arch Linux on.
    # Plug to into computer and boot.

    # Connecting to Internet (wifi)
    iwctl device list
    iwctl station wlan0 scan
    iwctl station wlan0 get-networks
    iwctl --passphrase <YOUR_PASSPHRASE> station wlan0 connect <YOUR_SSID>
    iwctl --passphrase <YOUR_PASSPHRASE> station wlan0 connect <YOUR_SSID>

    loadkeys uk

    # Partition the hard drive
    cfdisk

    # Delete all old partitions using to ui
    # Create a new partition of 100M in size
    # Create a new partition of 16G in size
    # Create a new partition of the rest of the disk (leave the size as what it puts in for you)
    # Select "write" and type yes and hit enter for each partition

    # Making the filesystems in the partitions
    mkfs.ext4 /dev/sda3
    mkfs.fat -F32 /dev/sda1
    mkswap /dev/sda2

    # Mount a prepare new boot directories
    mount /dev/sda3 /mnt
    mkdir -p /mnt/boot/efi
    mount /dev/sda1 /mount/boot/efi
    swapon /dev/sda2

    # Initial pacman setup
    pacman -Sy archlinux-keyring
    pacstrap /mnt base linux-lts linux-firmware base-devel grub efibootmgr neovim networkmanager

    genfstab /mnt > /mnt/etc/fstab

    arch-chroot /mnt

    # Timezone configuration
    ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
    hwclock --systohc

    nvim /etc/locale.gen
    # uncommet the line with `eb_GB.UTF-8 UTF-8
    # Save and exit
    locale-gen

    nvim /etc/locale.conf
    # Add "LANG=eb_GB.UTF-8"
    # Save and exit

    nvim /etc/vconsole.conf
    # ADD "KEYMAP=uk"
    # Save and exit

    nvim /etc/hostname
    # Add your chosen hostname
    # Save and exit

    passwd
    # Add and confirm root password

    # Create non-root user
    useradd -m -G wheel,audio,optical,storage,video <YOUR_NAME>

    passwd <YOUR_NAME>
    # Add and confirm your user password

    EDITOR=nvim visudo
    # Uncomment the line with "%wheel ALL=(ALL)ALL"
    # Save and exit

    systemctl enable NetworkManager

    grub-install /dev/sda
    grub-mkconfig -o /boot/grub/grub.cfg
    exit

    umount -a
    reboot
  11. davidpeach revised this gist May 28, 2023. 2 changed files with 8 additions and 1 deletion.
    8 changes: 8 additions & 0 deletions Installation.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Make a bootable usb stick with the latest version of Arch Linux on.
    # Plug to into computer and boot.

    # Connecting to Internet (wifi)
    iwctl device list
    iwctl station wlan0 scan
    iwctl station wlan0 get-networks
    iwctl --passphrase <YOUR_PASSPHRASE> station wlan0 connect <YOUR_SSID>
    1 change: 0 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    .
  12. davidpeach created this gist May 28, 2023.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    .