Skip to content

hrvdm/dots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍣 hrvdm's dot's

🚧 Do not blindly execute or copy files.

📷 Screenshots

🌿 Setup

1. Install Packages

Update sources:

sudo pacman -Syu

Install yay:

git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si

Install packages:

sudo pacman -S --noconfirm hyprland xdg-desktop-portal-hyprland zsh kitty nodejs npm dunst pipewire wireplumber polkit polkit-kde-agent socat jq gnome-bluetooth-3.0 bluez bluez-utils dart-sass brightnessctl pacman-contrib cava slurp hyprsunset playerctl cliphist
yay -S rbenv wofi firefox discord ttf-iosevka-nerd noto-fonts-emoji ttf-jetbrains-mono ttf-nerd-fonts-symbols wl-clipboard hyprpicker-git visual-studio-code-bin hyprpaper hyprpolkitagent

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install starship

curl -sS https://starship.rs/install.sh | sh

(optional) Install nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

If you do not install the optional packages, edit the .zshrc in this repos /home/.zshrc

Enable services:

sudo systemctl enable systemd-timesyncd.service --now

2. Clone & Move config

  1. Clone this repo: git clone https://github.com/hrvdm/dots.git
    cd dots
    cp -r Wallpapers ../
    cd config && cp -r * ../../.config
    cd ../home && cp * ../../
    
  2. Reboot: sudo reboot

⚙️ Extras

My Arch install guide

If you have not installed arch before, I recommend following the docs

I assume you already booted into the arch iso environment in UEFI mode.

Check UEFI & WiFi

  • Check UEFI mode: ls /sys/firmware/efi/efivars
  1. Connect to wifi with iwctl
  • iwctl
  • device list
  • station {DEVICE} scan
  • station {DEVICE} get-networks
  • station {DEVICE} connect {SSID}

Disk setup with LVM on LUKS

Get available disks:
For me it is /dev/sda

  • lsblk

Setup partitions:
For me it is fdisk /dev/sda:
If you get a warning like "Partition #X contains a vfat signature", press Y - This will overwrite your disk

  • fdisk /dev/{DISK}

  • Create empty GPT partition: g

  • Create the EFI partition:

    n

    Partition Number: PRESS ENTER

    First Sector: PRESS ENTER

    Last sector: +100M

    t

    Type/Alias: uefi

  • Create the boot partition:

    n

    Partition Number: PRESS ENTER

    First Sector: PRESS ENTER

    Last sector: +512M

    t

    If prompted, select partition 2

    Type/Alias: linux

  • Create the LUKS partition:

    n

    Partition Number: PRESS ENTER

    First Sector: PRESS ENTER

    Last sector: PRESS ENTER

    t

    If prompted, select partition 3

    Type/Alias: linux

  • Check setup: p

    This should print a table, the fields should be something like:

    Device Size Type
    /dev/sda1 100M EFI System
    /dev/sda2 512M Linux Filesystem
    /dev/sda3 930.9GB Linux Filesystem
  • Write changes to disk: w

  • Format Partitions:

    Replace DISK-EFI and DISK-BOOT with your EFI and boot partitions.
    For me this is /dev/sda1 and /dev/sda2

    mkfs.fat -F 32 /dev/{DISK-EFI}

    mkfs.ext4 /dev/{DISK-BOOT}

  • Setup encrypted partition:

    Replace DISK-LUKS with your LUKS partition.
    For me this is /dev/sda3

    cryptsetup --use-random luksFormat /dev/{DISK-LUKS}

    cryptsetup luksOpen /dev/{DISK-LUKS} cryptlvm

  • Create LVM volume group:

    pvcreate /dev/mapper/cryptlvm

    vgcreate vg0 /dev/mapper/cryptlvm

  • Create LVM partitions:

    lvcreate --size 34G vg0 --name swap (RAM Size + 2GB)

    lvcreate --size 100G vg0 --name root

    lvcreate -l +100%FREE vg0 --name home

  • Format volumes:

    mkswap /dev/vg0/swap

    mkfs.ext4 /dev/vg0/root

    mkfs.ext4 /dev/vg0/home

  • Mount filesystem:

    Replace DISK-EFI and DISK-BOOT with your EFI and boot partitions.
    For me this is /dev/sda1 and /dev/sda2

    mount /dev/vg0/root /mnt

    mount --mkdir /dev/{DISK-EFI} /mnt/efi

    mount --mkdir /dev/{DISK-BOOT} /mnt/boot

    mount --mkdir /dev/vg0/home /mnt/home

    swapon /dev/vg0/swap

Pacstrap

Even if you do not plan to use vim, you need it for visudo. You can change this but it's easier to use vim for first install.

  • Run pacstrap:

    pacstrap -K /mnt base linux linux-headers linux-firmware openssh git vim sudo nano networkmanager lvm2 reflector ufw base-devel rustup

Generate fstab

  • genfstab -U /mnt >> /mnt/etc/fstab

Enter system

If this throws an error, you might have mistyped something.

  • arch-chroot /mnt /bin/bash

Setup system

  • Timezone & Locale:

    If your not in london, use ls /usr/share/zoneinfo/ to get timezones.

    ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

    hwclock --systohc

    cat /etc/locale.gen (You can | grep {REGION} i.e. | grep en_GB)

    echo "en_GB.UTF-8 UTF-8" > /etc/locale.gen

    locale-gen

    echo LANG={REGION} > /etc/locale.conf (Replace {REGION} with your's i.e. en_GB.UTF-8)

  • Hostname:

    echo {YOUR-HOSTNAME} > /etc/hostname

  • Create your user:

    useradd -m -G wheel --shell /bin/bash {USERNAME}

    passwd {USERNAME} (If you use special chars, you might want to check their expected keys first)

    visudo

    • Enter write mode with i.
    • Uncomment "%wheel ALL=(ALL:ALL) ALL"
    • Press ESC to open command palette
    • Save and exit with :w then :qa.
  • Configure mkinitcpio:

    nano /etc/mkinitcpio.conf

    • Add 'encrypt' and 'lvm2' to HOOKS before 'filesystems'

    mkinitcpio -P

  • Setup grub:

    pacman -S grub efibootmgr

    If you error here, check your mount points

    grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB

    nano /etc/default/grub

    • Add (Change YOUR-LUKS): GRUB_CMDLINE_LINUX="cryptdevice=/dev/{YOUR-LUKS}:cryptlvm root=/dev/vg0/root"

    grub-mkconfig -o /boot/grub/grub.cfg

  • Enable networkmanager:

    systemctl enable NetworkManager

  • Exit & Reboot:

    exit

    umount -R /mnt

    swapoff -a

    reboot


We are done!

Get a kernel panic?

Reboot to the install USB, unlock cryptlvm and remount, then fix whatever error occured. Usually its a typo or missed step.

cryptsetup luksOpen /dev/{DISK-LUKS} cryptlvm

lsblk

mount /dev/vg0/root /mnt
mount --mkdir /dev/{DISK-EFI} /mnt/efi
mount --mkdir /dev/{DISK-BOOT} /mnt/boot
mount --mkdir /dev/vg0/home /mnt/home
swapon /dev/vg0/swap
Configure via SSH

If you want to SSH to your system after arch is installed:

  1. Make sure it has an IP
    • if not connect it: nmtui.
  2. Start SSH daemon - sudo systemctl start sshd
  3. Enable SSH daemon - sudo systemctl enable sshd
  4. Enable UFW: sudo ufw enable
  5. Allow SSH in UWF: sudo ufw allow 22/tcp
  6. Grab your IP: ip a | grep "inet 192.168."

Remember to disable this post-install

Without ly DM

edit ~/.zlogin and add

# Start window manager
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
  exec Hyprland
fi

Remember to disable this post-install

Optimisations

Mirror list:

sudo pacman -S reflector
sudo nano /etc/xdg/reflector/reflector.conf
sudo systemctl enable reflector.timer --now

Power for laptops:

sudo pacman -S thermald
yay -S auto-cpufreq
sudo systemctl enable thermald.service --now
sudo systemctl enable auto-cpufreq.service --now

SSD fstrim:

Arch SSD Docs

sudo systemctl enable fstrim.timer --now

About

🍣 My dot files, scripts and setup guides.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published