My dotfiles for Arch Linux

dotfiles#

My dotfiles for CachyOS.

Usage#

Prerequisits#

I use CachyOS, which is an Arch Linux based distro with some nice benefits:

  • Kernel and packages compiled with Zen 4 (AMD) support
  • Desktop environment selection during installation
  • Good defaults (Alacritty, fish, paru)
  • Many useful packages pre-installed (eza, fprintd, bat)

First, install CachyOS Desktop Edition and select Limine as a bootloader and niri as desktop environment.

Setup#

I use niri as my preferred desktop environment and it comes preconfigured with CachyOS. My dotfiles are based on it, but customize some of it.

Install additional packages#

My niri setup depends on the following additional packages:

paru -S \
  swayidle \
  kwallet-pam \
  fprintd \
  yazi \
  btop \
  bluetui \
  impala

I prefer iwd as Wifi back-end of NetworkManager. Once configured, restart the service:

sudo systemctl restart NetworkManager.service

Wifi must be reconfigured now.

Create SSH key#

I use my Yubikey to authorize SSH key usage. This requires libfido2:

paru -S libfido2

Then generate a new SSH key (default location, no passphrase):

ssh-keygen -t ed25519-sk -C jan.ehrhardt@cozybytes.tech

Setup Neovim#

Install the required packages:

paru -S \
  neovim \
  tree-sitter-cli

I use LazyVim, which is a Neovim distro with good defaults for programming. Install it by following the instructions.

Setup terminal#

Install additional packages for my terminal setup:

paru -S \
  starship \
  zellij \
  zoxide \
  atuin \
  mise

Login to atuin and sync history:

atuin login
atuin sync

Setup dotfiles#

I use chezmoi to manage my dotfiles. First, install it:

paru -S chezmoi

Then apply the dotfiles from my Git repo:

chezmoi init --ssh --apply git@tangled.org:jehrhardt.dev/dotfiles

This will automatically configure the system.

Ensure systemd units are enabled#

I use systemd to launch several services along niri. They must be enabled by:

systemctl --user add-wants niri.service plasma-polkit-agent.service
systemctl --user add-wants niri.service mako.service
systemctl --user add-wants niri.service waybar.service
systemctl --user add-wants niri.service swayidle.service

Setup fingerprint reader#

I prefer to use the fingerprint reader to unlock my laptop and authorize sudo commands in my terminal.

Update PAM configuration to use fingerprint authentication.

/etc/pam.d/sudo#

Add before other config:

auth      sufficient pam_fprintd.so
/etc/pam.d/polkit-1#

Add the following:

#%PAM-1.0
auth      sufficient pam_fprintd.so
auth      required   pam_unix.so
account   required   pam_unix.so
password  required   pam_unix.so
session   required   pam_unix.so
/etc/pam.d/swaylock#

Add before other config:

auth      sufficient pam_unix.so try_first_pass likeauth nullok
auth      sufficient pam_fprintd.so
Add new fingerprint#

Restart polkit agent:

systemctl --user restart plasma-polkit-agent.service

Enroll:

fprintd-enroll

Then verify:

fprintd-verify

Install development tools#

I use several tools for development that are not configured via my dotfiles, but need to be setup.

OpenCode#

I use OpenCode as my preferred coding agent. Some of the reasons:

  • Nice TUI
  • Supports different models and providers
  • It works really well

Install it:

paru -S opencode-bin
Docker and Supabase CLI#

Supabase CLI uses Docker to run locally. This is nice for development.

Install required packages:

paru -S \
  supabase-bin \
  lazydocker \
  docker \
  docker-buildx \
  docker-compose

Enable Docker service:

sudo systemctl enable docker.service

Give yourself permission to access Docker daemon:

sudo usermod -aG docker $USER
Rust#

I use mise to setup development environments including programming languages. Rust is the only exception as I prefer rustup.

It can be installed as a package:

paru -S rustup

I use stable toolchain:

rustup install stable
Python via uv#

I vibe code Python for automation and experimentation and my preferred way to handle it is uv.

Install it via mise:

mise use --global uv

Then install completions:

echo 'uv generate-shell-completion fish | source' > ~/.config/fish/completions/uv.fish
echo 'uvx --generate-shell-completion fish | source' > ~/.config/fish/completions/uvx.fish
Node.js#

Plenty of tools (e.g. language servers used by Neovim) require Node.js to present.

Install LTS version via mise:

mise use --global node@lts

Install other apps#

OpenCode#

My preferred coding agent:

paru -S opencode-bin
Brave#

My preferred browser. It uses KWallet for storing passwords (requires wallet password to match user password).

paru -S brave-bin
Obsidian#

My preferred note taking app:

paru -S obsidian-bin