summaryrefslogtreecommitdiff
path: root/docs/NOTES.org
blob: 3562f30ed9f01c259a33fd5c32855e3fd144d040 (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
131
132
133
134
135
136
137
138
139
140
141
142
#+TITLE: ArchSetup Development Notes
#+DATE: 2025-11-10

* 2026-01-09: AI Assistants Tmux Launcher Script

** Work Completed

- Created ~/.local/bin/ai-assistants script for launching multiple Claude sessions
- Script creates tmux session "ai-assistants" with 7 named windows (health, finances, danneel, jr-estate, kit, homelab, nextjob)
- Each window opens respective project directory and starts Claude with session-start workflow prompt
- Script attaches to existing session if already running (idempotent)
- Fixed rofi absolute symlink conflict during stow (removed and let stow recreate as relative)

** Context for Next Session

- ai-assistants script ready to use - just run `ai-assistants` from terminal
- Consider adding more projects to the script as needed

* 2025-12-01: Major Feature Session - Pre-flight, State Tracking, Integration Test

** Work Completed

*** Rofi Configuration Standardization
- Created self-contained rofi configuration in dotfiles/system/.config/rofi/
- Designed theme to match dunst notification colors (bg: #383c4af0, fg: #cdd1dc, border: #2d303c)
- Simplified sxhkd keybindings (removed inline flags, moved to config.rasi)
- Removed phantom PATH entry for non-existent ~/.config/rofi/scripts/

*** Nitrogen to Feh Migration
- Replaced nitrogen with feh (nitrogen removed from Arch repos)
- Updated all references: .xinitrc, monitor script, lf/lfrc, ranger/rc.conf
- Added feh to archsetup package list

*** Pre-flight Checks Implementation
- Added preflight_checks() function validating:
  - Disk space (20GB minimum)
  - Network connectivity (ping archlinux.org)
  - pacman availability
  - Arch Linux detection (/etc/arch-release)

*** State Tracking for Resume Capability
- State stored in /var/lib/archsetup/state/ as timestamped marker files
- run_step() wrapper tracks completion of 12 major installation phases
- Added CLI flags: --status (show progress), --fresh (clear state), --help

*** Integration Test Fixes
- Fixed duplicate package entries (multimarkdown, proselint were listed as both AUR and pacman)
- Diagnosed and fixed git server 504 errors (fcgiwrap overload after 2 months)
- Blocked aggressive crawler IP via UFW

** Test Results
- Test 20251201-084055: *PASSED* (60m 34s)
- 3 non-critical errors: mkinitcpio-firmware (intermittent), multimarkdown/proselint (fixed)

** Git Commits (8 total)
- 590aa02: feat(rofi): standardize rofi configuration with dunst-matched theme
- 0601d39: feat(wallpaper): replace nitrogen with feh
- 84a52a8: docs(TODO): mark completed tasks from today's session
- bcacfa0: docs(TODO): mark -debug packages task as verified complete
- 03145a1: docs(TODO): mark root check and git pull fixes as verified complete
- 75b0a17: feat(archsetup): add pre-flight checks before installation
- 50423fd: feat(archsetup): implement state tracking for resume capability
- 777e113: fix(archsetup): remove duplicate multimarkdown and proselint entries

** Context for Next Session
- mkinitcpio-firmware occasionally fails (network/AUR timing issue) - kept as-is
- All [#A] priority TODOs now complete
- Consider testing resume capability (--fresh then interrupt mid-run)

* 2025-11-21: GPG/Emacs Authentication Fix

** Problem Diagnosed
- mu4e in Emacs failing with "gpg: problem with the agent: End of file"
- Root cause: Emacs daemon started via systemd user service (emacs.service)
- systemd-started Emacs had no DISPLAY or GPG_TTY in environment
- pinentry-dmenu couldn't connect to X, causing silent failures
- gpg-agent settings were fine (400-day TTL, pinentry-dmenu, ssh-support)

** Diagnostic Commands Used
#+begin_src bash
gpgconf --list-dirs agent-socket   # Socket present at /run/user/1000/gnupg/S.gpg-agent
gpg-connect-agent 'getinfo pid' /bye  # Agent running (pid 1759, --supervised)
cat /proc/1728/environ | tr '\0' '\n' | grep -E 'GPG|TTY|DISPLAY'  # Empty - no X env
#+end_src

** Previous Fix (Did Not Work)
- Disabled emacs.service: =systemctl --user disable emacs.service=
- Issue persisted after reboot - still got "End of file" error in mu4e

** Understanding "End of File" Error
- Error comes from IPC level between gpg-agent and pinentry
- pinentry-dmenu spawns, tries to connect to X11, fails (no DISPLAY)
- pinentry crashes/exits without sending response
- gpg-agent reads EOF from the pipe and reports the error
- The error message is the literal syscall result, not a helpful description

** Actual Fix Applied
- Added =~/.local/bin/reset-auth= call to .xinitrc after DISPLAY is exported
- This restarts gpg-agent with correct DISPLAY environment
- Runs before any apps (signal-desktop, protonmail-bridge, etc.) start
- Location: .xinitrc lines 29-31

** Key Files Referenced
- ~/.gnupg/gpg-agent.conf - TTL and pinentry settings
- ~/.xinitrc - now includes reset-auth call after DISPLAY export
- ~/.local/bin/reset-auth - restarts gpg-agent with current environment

** Context for Next Session
- Verify GPG auth works correctly after next reboot
- If still failing, investigate pinentry-dmenu X11 connection

* 2025-11-18: Console Font Configuration

** Work Completed
- Improved console font readability for laptop display
- Tested multiple console fonts: solar24x32, latarcyrheb-sun32, terminus variants
- Selected ter-132n (Terminus 32px normal) as optimal for readability
- Updated /etc/vconsole.conf to FONT=ter-132n on current system
- Added terminus-font package to archsetup (archsetup:561)
- Changed console font configuration from lat0-16 to ter-132n (archsetup:965)

** Console Font History
- Original (pre-Nov 16): No FONT setting (kernel default, very small)
- Commit 26a20f3: Added FONT=lat0-16 (moderate size, 16px)
- Uncommitted change: FONT=lat4a-19 (HiDPI, too small for laptop)
- Current configuration: FONT=ter-132n (large, 32px, excellent readability)

* 2025-11-16: Session Workflows Setup

** Work Completed
- Adopted session-start workflow from claude-templates
- Executed session start routine: synced templates, checked inbox (empty), reviewed project context
- Updated session-wrap-up workflow in both archsetup and claude-templates projects
  - Changed archiving from time-based (7 days/2 weeks) to session-count-based (keep last 5 sessions)
  - Updated both docs/templates/docs/workflows/session-wrap-up.org and ~/projects/claude-templates/docs/workflows/session-wrap-up.org
- Verified all ~/.profile.d/ files are properly symlinked to ~/code/archsetup/dotfiles/system/.profile.d/

** Context for Next Session
- Outstanding TODOs from 2025-11-13 session still pending:
  - Run verification test to confirm yay-debug is no longer installed
  - Investigate 56 AUR package retry errors
  - Consider if errors need to be addressed or are acceptable failures