# 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](https://alacritty.org), [fish](https://fishshell.com), [paru](https://github.com/Morganamilo/paru)) - Many useful packages pre-installed (eza, fprintd, bat) First, install [CachyOS Desktop Edition](https://cachyos.org/download/) 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: ```bash paru -S \ swayidle \ kwallet-pam \ fprintd \ yazi \ btop \ bluetui \ impala ``` I prefer [iwd as Wifi back-end of NetworkManager](https://wiki.archlinux.org/title/NetworkManager#Using_iwd_as_the_Wi-Fi_backend). Once configured, restart the service: ```bash 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`: ```bash paru -S libfido2 ``` Then generate a new SSH key (default location, no passphrase): ```bash ssh-keygen -t ed25519-sk -C jan.ehrhardt@cozybytes.tech ``` #### Setup Neovim Install the required packages: ```bash 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](https://www.lazyvim.org/installation). #### Setup terminal Install additional packages for my terminal setup: ```bash paru -S \ starship \ zellij \ zoxide \ atuin \ mise ``` Login to atuin and sync history: ```bash atuin login atuin sync ``` #### Setup dotfiles I use [chezmoi](https://www.chezmoi.io) to manage my dotfiles. First, install it: ```bash paru -S chezmoi ``` Then apply the dotfiles from my Git repo: ```bash 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: ```bash 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: ```bash systemctl --user restart plasma-polkit-agent.service ``` Enroll: ```bash fprintd-enroll ``` Then verify: ```bash 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: ```bash paru -S opencode-bin ``` ##### Docker and Supabase CLI Supabase CLI uses Docker to run locally. This is nice for development. Install required packages: ```bash paru -S \ supabase-bin \ lazydocker \ docker \ docker-buildx \ docker-compose ``` Enable Docker service: ```bash sudo systemctl enable docker.service ``` Give yourself permission to access Docker daemon: ```bash sudo usermod -aG docker $USER ``` ##### Rust I use [mise](https://mise.jdx.dev) to setup development environments including programming languages. Rust is the only exception as I prefer [rustup](https://rustup.rs). It can be installed as a package: ```bash paru -S rustup ``` I use stable toolchain: ```bash 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: ```bash mise use --global uv ``` Then install completions: ```bash 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: ```bash mise use --global node@lts ``` #### Install other apps ##### OpenCode My preferred coding agent: ```bash paru -S opencode-bin ``` ##### Brave My preferred browser. It uses KWallet for storing passwords (requires wallet password to match user password). ```bash paru -S brave-bin ``` ##### Obsidian My preferred note taking app: ```bash paru -S obsidian-bin ```