Skip to content

Repository files navigation

Dotfiles

Optioned Linux for a dev environment

git clone --no-checkout https://github.com/klarkc/dotfiles
mv dotfiles/.git ~
rm -r dotfiles

⚠ Next command will replace current home files with repo files (backup first!)

git checkout main

Features

Machines

Each machine has specific configurations and enabled features so I'm splitting it between different branches.

  • ssdinarch: my personal laptop
  • main (default): work machine

Aliases

  • l: ls -l
  • ll: ls -la
  • lt: ls -lt

Optional Features

Supported setups

Below are the supported distro setups

Arch Linux with NVidia

Dependencies

pacman -Syu yay
yay -Syu openssh pwvucontrol pipewire pipewire-audio pipewire-pulse pipewire-alsa git git-lfs gvim qt5-styleplugins nix ttf-fira-code noto-fonts-emoji lsd dconf-editor picom xorg-xmodmap xclip keyd dunst libnotify lemurs haskell-language-server xmonad xmonad-contrib xorg-xsetroot xorg-xset xorg-xmessage feh the_silver_searcher satty scrot wget xorg-server taffybar libappindicator-gtk3 blueman dmenu sword i3lock xss-lock
sudo chmod +s .local/bin/pacman-*
systemctl enable --now nix-daemon.socket
systemctl enable --now lemurs

Alacritty is installed by the Nix profile from the ink-splatters/alacritty-ligatures fork, so it is intentionally not installed from pacman/yay here.

Below dependencies are not mandatory but highly recommended

yay -Syu ffmpeg unzip htop

Below dependencies are not mandatory (see Optional Features)

yay -Syu snapper pacreport yay-cache-cleanup-hook sunshine bat git-delta ripgrep handlr ollama-cuda discord enpass-bin crush btdu btop

Lumen

yay -Syu lumen
yay --asdeps fzf mdcat

Yazi as file manager with optional deps

yay -Syu yazi
yay -S --asdeps 7zip jq poppler fd fzf zoxide resvg imagemagick xclip xsel chafa

Installation

nix profile install .
make
systemctl --user daemon-reload

OpenCode + Codex OAuth

opencode uses OpenCode's native auth store at ~/.local/share/opencode/auth.json. The wrapped opencode command lazily syncs Codex OAuth before launch when ~/.codex/auth.json exists and is newer than the OpenCode auth file, or when the OpenCode auth file does not exist yet.

Run the sync explicitly after authenticating Codex or when rotating accounts:

opencode-codex-auth-import

Verify the imported OpenAI provider auth:

jq '.openai | {type, has_access: has("access"), has_refresh: has("refresh"), has_accountId: has("accountId"), expires}'~/.local/share/opencode/auth.json

Install the Lemurs XMonad session wrapper after checkout. It starts XMonad with a valid D-Bus session when needed, imports the graphical environment into D-Bus and systemd user activation, and starts a notification daemon if one is installed.

sudo install -Dm755 .local/bin/xmonad-session /etc/lemurs/wms/xmonad

Test desktop notifications after logging in again:

notify-send "dotfiles""desktop notifications work"

Configure the system-wide keyd remap so ç remains the regular Unicode character, while Ctrl+ç is emitted as Ctrl+b for tmux and terminal shortcuts. This requires sudo because the keyd config lives in /etc/keyd and the daemon runs system-wide.

sudo install -d /etc/keyd
sudo tee /etc/keyd/default.conf >/dev/null <<'EOF'[ids]*[control]semicolon = C-bEOF
sudo keyd check
sudo systemctl enable --now keyd
sudo keyd reload

If the ç key is not reported as semicolon on a machine, check it with:

sudo keyd monitor

Fusion's systemd service uses ~/.fusion/ssh_config for Git SSH operations. Keep that file generated when OpenSSH configuration changes so sandboxed Fusion can read a stable SSH config.

Install the pacman hook so this generated SSH config is refreshed after openssh or systemd package updates:

sudo install -Dm644 .local/share/pacman/hooks/fusion-ssh-config.hook /etc/pacman.d/hooks/fusion-ssh-config.hook

Below steps are not mandatory (see Optional Features)

systemctl --user enable home-cleanup.timer
systemctl --user enable nix-cleanup.timer
systemctl --user enable pacreport.timer
systemctl --user enable --now sunshine.service
systemctl --user enable --now fusion-backup.timer
systemctl --user enable --now kolu

vLLM + Fusion

The vLLM/Fusion workflow is target-based. Only one vLLM model target should run at a time:

  • vllm-qwen3.6-35B-a3b.target starts vllm@qwen3.6-35B-a3b.service
  • vllm-qwen3.6-27B.target starts vllm@qwen3.6-27B.service

Use vllm-config to choose the active local model. It stops Fusion and all vLLM units, disables the non-selected target, enables the selected target for future user-session starts, starts the selected target, and follows the relevant journal logs until vllm@...service and fusion.service are active.

The target starts only the selected vLLM service. The vLLM service then patches local Crush/Fusion/Pi defaults, starts the model, waits for GET /v1/models to respond with the selected served model, and only then restarts Fusion so it rereads changed config files. Fusion is intentionally not pulled directly by the target; readiness is owned by vLLM@...service.

Pick the model interactively:

vllm-config

Or switch directly:

vllm-config qwen3.6-35B-a3b
vllm-config qwen3.6-27B

Verify which target will start with the user systemd session:

systemctl --user is-enabled vllm-qwen3.6-35B-a3b.target
systemctl --user is-enabled vllm-qwen3.6-27B.target

The selected target should be enabled; the other targets should be disabled. The legacy single-model vllm.service is obsolete; vllm-config stops and disables it when switching models.

User systemd services start when the user manager starts. To start the selected vLLM target after reboot before an interactive login, enable lingering once:

loginctl show-user "$USER" -p Linger
sudo loginctl enable-linger "$USER"

After lingering is enabled, re-check:

loginctl show-user "$USER" -p Linger

Expected:

Linger=yes

Watch startup progress:

journalctl --user-unit vllm-qwen3.6-35B-a3b.target -f
journalctl --user-unit vllm@qwen3.6-35B-a3b.service -f
journalctl --user-unit fusion.service -f

Run the maintained vLLM benchmark wrapper against the active target:

vllm-benchmark

Benchmark artifacts are written below ~/.cache/vllm-benchmarks/.

For the 27B target, replace 35B-a3b with 27B in the commands above.

Generic archive pack (archive-pack)

The archive-pack and archive-pack-test commands are provided by the Nix flake (.nix/backup-tools.nix) and installed into the user profile by nix profile install ..

Inputs live in ~/.backup/:

  • Any file or directory — archives (*.tar, *.tar.gz, *.tar.bz2, *.tar.xz, *.tar.zst, *.tar.lz, *.zip, *.7z) get extracted and their contents stored.
  • Plain files are stored as-is.
  • Directories are stored recursively.

Excluded by default: stage/, logs/, manifest/, archive.lrz, archive.lrz.SUMMARY.txt, archive-*.lrz, .gitignore, README.md. Use --exclude GLOB to add more.

Outputs:

  • ~/.backup/archive.lrz — single deduplicated archive (lrzip).
  • ~/.backup/archive-YYYYMMDD-HHMMSS.lrz — datestamped snapshots when --retain > 0.
  • ~/.backup/archive.lrz.SUMMARY.txt — generation report.
  • ~/.backup/stage/ — staging directory (visible, kept unless --clean-temp).
  • ~/.backup/logs/ — log directory (visible, kept unless --clean-temp).
  • ~/.backup/manifest/ — list of files inside the archive.

The script is append-only: re-pack merges the previous archive with new sources. Files removed from ~/.backup/ stay in the archive; lrzip dedups identical content across all files.

Install/upgrade:

nix profile install .# or
nix profile upgrade klarkc

Run with safe defaults (≈8 threads, ≈8 GB RAM cap, window 2 GB, level 6):

archive-pack

Tune resources:

archive-pack --threads 4 --maxram 40 --window 10 --level 6

Dry run:

archive-pack --dry-run

Skip per-file integrity check:

archive-pack --skip-source-integrity

Keep original archive files alongside their extracted contents:

archive-pack --keep-archives

Exclude additional paths (repeatable):

archive-pack --exclude '*.tmp' --exclude 'cache/'

Snapshot retention (default: keep last 5 datestamped archives):

archive-pack --retain 5
archive-pack --retain-days 30

Clean temporary staging and logs after a successful pack:

archive-pack --clean-temp

Clean original sources (everything in ~/.backup/ except the built-in excludes and any --exclude patterns) after a successful pack and lrzip -t:

archive-pack --clean-source

Combine both:

archive-pack --clean-temp --clean-source

Verify the archive integrity without repacking:

archive-pack --verify

The final archive.lrz is never removed by the script.

Run the self-test (synthetic backup with append-only check):

archive-pack-test
# or, via flake check
nix flake check

nix flake check runs the formatting check, pre-commit checks and archive-pack-test as part of checks.archive-pack-test.

How to extract later (no Nix required at extraction time):

lrzip -t ~/.backup/archive.lrz # verify integrity
lrzip -d -o - ~/.backup/archive.lrz # produces .tar on stdout
lrzip -d ~/.backup/archive.lrz # produces archive.tar
mkdir -p restored && tar -xf archive.tar -C restored

About

Optioned Linux for a dev environment

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages