aboutsummaryrefslogtreecommitdiff
path: root/CLAUDE.md
blob: 03da278cc81acb192463c33684360f5b8a999def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Archsetup Project Context

## Overview
Arch Linux installation and configuration scripts with dotfiles managed via GNU Stow. Supports both X11 (DWM) and Wayland (Hyprland) setups.

## Project Structure
```
archsetup              Main installation script
archsetup.conf.example Configuration template
init                   Bootstrap script for live ISO
Makefile               VM integration testing + project dependencies
todo.org               Active task list

scripts/               Utility scripts (wireguard, post-install, wipedisk, etc.)
assets/                Reference documents and archived files
  color-themes/        Theme palettes, generation scripts
  outbox/              Processed inbox items
  wireguard-config/    Proton VPN configs
.ai/                   Claude tooling: session docs, workflows, protocols (gitignored)
inbox/                 Unprocessed documents for session review
reference-repos/       External dotfile references
scripts/testing/       VM-based integration test framework
test-results/          Test run output
vm-images/             VM disk images for testing
```

## Makefile Targets
```
make deps          # Install VM-testing dependencies
make test-unit     # Run fast unit tests for installer helpers (no VM)
make test          # Run full VM integration test (creates base VM if needed)
make test-keep     # Run test and keep the VM up for manual poking
make test-vm-base  # Create the base VM only
```
Dotfile stow operations live in the dotfiles repo's own Makefile, not here.
Run them from `~/.dotfiles`:
```
cd ~/.dotfiles && make stow hyprland     # common + hyprland + host tier
cd ~/.dotfiles && make restow hyprland   # refresh links after git pull
cd ~/.dotfiles && make reset hyprland    # fix conflicts, keep repo version
cd ~/.dotfiles && make unstow hyprland   # remove symlinks
cd ~/.dotfiles && make import common     # fzf select → import to common/
cd ~/.dotfiles && make test              # run the dotfile-script unit suites
```
Per-host overrides live in a stow tier named after the machine (`ratio/`,
`velox/`), auto-included by every stow target when the directory exists
(`HOST=<name>` overrides detection; hostname binary is absent — `uname -n`).
The tier holds only files no shared package owns: hypr `conf.d/local.conf`
(velox: HiDPI scale + XWayland toolkit env), `pypr/config.toml`, and foot's
`host.ini` (the shared foot.ini sets no font — it's per-host via include).

## Dotfiles Repository

Dotfiles live in their own repo at `git.cjennings.net/dotfiles.git`
(read: `https://git.cjennings.net/dotfiles.git`, push: `git@cjennings.net:dotfiles.git`).
A fresh `archsetup` install clones it to `~/.dotfiles` and stows per `DESKTOP_ENV`:

```
dwm       → common/ + dwm/
hyprland  → common/ + hyprland/
none      → minimal/   (standalone headless tree, not common/)
```

Config keys (in `archsetup.conf`, all optional — defaults shown):
```
DOTFILES_REPO=https://git.cjennings.net/dotfiles.git
DOTFILES_BRANCH=main
DOTFILES_DIR=   # defaults to the target user's ~/.dotfiles
```

Pull dotfile changes after install:
```
cd ~/.dotfiles && git pull
cd ~/.dotfiles && make restow hyprland
```

Setting up a new machine by hand (outside the installer):
```
git clone https://git.cjennings.net/dotfiles.git ~/.dotfiles
cd ~/.dotfiles && make stow hyprland
```
**Quit Hyprland before an unstow/restow.** Unstowing while Hyprland runs makes
it write a stub `hyprland.conf` into the gap, which then blocks the restow. Do
it from a TTY, or with the session stopped.

## Dotfile Script Counts
The scripts live in the dotfiles repo (`~/.dotfiles`), not here:
```
~/.dotfiles/common/.local/bin/    → 33 universal scripts
~/.dotfiles/dwm/.local/bin/       → 8 X11/DWM scripts
~/.dotfiles/hyprland/.local/bin/  → 7 Hyprland scripts
```

## Shell Configuration
```
~/.profile          → Environment variables only (POSIX compatible)
~/.bash_profile     → Sources .profile + .bashrc for login shells
~/.bashrc           → Bash-specific settings, sources .bashrc.d/
~/.zshrc            → Zsh-specific settings, sources .zshrc.d/
~/.profile.d/       → Modular env vars (display, framework, auto-tmux, hyprland)
~/.bashrc.d/        → Modular bash configs (aliases, fzf, git, media, utilities, emacs)
~/.zshrc.d/         → Modular zsh configs (same + arch-downgrade)
```

## Theme System
Two themes available: dupre (default) and hudson. Switched via `set-theme` script.

Full palette reference: `assets/color-themes/dupre/dupre-palette.org`

- **GTK**: Adwaita-dark
- **Qt**: Adwaita-Dark (via adwaita-qt5/qt6, QT_STYLE_OVERRIDE)
- **Icons**: Papirus-Dark
- **Cursors**: Bibata-Modern-Ice (size 24)
- **Font**: BerkeleyMono Nerd Font (13pt terminal, 14px waybar)
- **Theme configs**: `~/.dotfiles/hyprland/.config/themes/dupre/`

## Key Configuration Files
- `~/.dotfiles/hyprland/.config/hypr/hyprland.conf` - Main Hyprland config
- `~/.dotfiles/hyprland/.config/themes/dupre/` - Dupre theme files (foot, fuzzel, waybar, dunst, hyprlock, Xresources)
- `~/.dotfiles/common/.profile.d/` - Shell environment scripts
- `~/.dotfiles/common/.config/qt5ct/qt5ct.conf` - Qt5 theming
- `~/.dotfiles/common/.config/qt6ct/qt6ct.conf` - Qt6 theming

## Notes
- Desktop file overrides go in `~/.dotfiles/hyprland/.local/share/applications/`
- MPD is configured but mpv handles audio file associations
- Firewall is ufw (configured in `archsetup`, default-deny incoming, explicit allow list). Tailscale traffic **does** traverse ufw on ratio — a probe from a tailnet IP is still blocked unless a rule covers the port. Don't assume tailnet-only services bypass the firewall; they need an explicit ufw rule like any other.
- This machine is **ratio**; **velox** is a laptop. Both run Hyprland (Wayland). archsetup still supports dwm/X11, but no current machine uses it.
- Remote repository on cjennings.net
- .ai/ is gitignored; living project context is in .ai/notes.org