Homelab: [homelab-agents] - Session 2026-04-12
Bootstrap home-apps and fix Emacs/iPad integration issues. Changes: - Added home-apps-session-summary.md documenting Emacs config fixes - Updated CLAUDE.md session history with 2026-04-12 entry - Added home-apps to VPS instance list in CLAUDE.md Repository: http://100.120.125.113:3000/pdm/homelab-agents Next Session Focus: Test mermaid rendering on iPad end-to-end
This commit is contained in:
27
CLAUDE.md
27
CLAUDE.md
@@ -107,6 +107,29 @@ This is a shared repository containing Claude Code agents that can be deployed a
|
|||||||
|
|
||||||
## Session History
|
## Session History
|
||||||
|
|
||||||
|
### Session 2026-04-12
|
||||||
|
- **Phase**: Emacs/iPad integration fixes
|
||||||
|
- **VPS**: home-apps
|
||||||
|
- **Repository**: homelab-agents
|
||||||
|
- **Accomplishments**:
|
||||||
|
- Fixed Emacs init error in `flashcard-config.el` (mismatched parenthesis causing void-variable crash)
|
||||||
|
- Fixed cross-platform load paths in `flashcard-config.el` and `task-config.el` (Mac vs VM paths)
|
||||||
|
- Added `~/.emacs.d/secrets.el` symlink
|
||||||
|
- Fixed ELPA package visibility by adding `~/emacs_config/elpa` to `package-directory-list` on Linux
|
||||||
|
- Added `mermaid-mode` package alongside existing `ob-mermaid`
|
||||||
|
- Fixed Puppeteer/Chromium sandbox error for mermaid rendering on Linux VM
|
||||||
|
- Investigated and confirmed Notion credentials path resolves correctly
|
||||||
|
- Set up `.netrc` on home-apps for Gitea authentication (both public domain and internal IP)
|
||||||
|
- Bootstrapped home-apps into the homelab-agents workflow
|
||||||
|
- **Key Decisions**:
|
||||||
|
- Conditional `darwin`/Linux load paths keep one config file working on both platforms
|
||||||
|
- Puppeteer config file acts as a feature flag — presence enables `--no-sandbox`, absence is safe
|
||||||
|
- `.netrc` requires two entries when scripts use internal IP for git operations
|
||||||
|
- **Next Steps** (Prioritized):
|
||||||
|
- Test mermaid rendering end-to-end on iPad (compile + Babel blocks)
|
||||||
|
- Verify Notion Tasks opens cleanly
|
||||||
|
- Install `mermaid-mode` on Mac via `M-x package-install`
|
||||||
|
|
||||||
### Session 2025-11-30
|
### Session 2025-11-30
|
||||||
- **Phase**: NetBox DHCP pool configuration automation
|
- **Phase**: NetBox DHCP pool configuration automation
|
||||||
- **VPS**: sys-apps
|
- **VPS**: sys-apps
|
||||||
@@ -164,8 +187,8 @@ This is a shared repository containing Claude Code agents that can be deployed a
|
|||||||
4. Optional: Set GITEA_API_TOKEN for auto-repo creation
|
4. Optional: Set GITEA_API_TOKEN for auto-repo creation
|
||||||
|
|
||||||
**VPS Instances Using This Repository:**
|
**VPS Instances Using This Repository:**
|
||||||
- sys-apps (current)
|
- sys-apps
|
||||||
- [Add other VPS hostnames as they're configured]
|
- home-apps (bootstrapped 2026-04-12)
|
||||||
|
|
||||||
## Quick Reference
|
## Quick Reference
|
||||||
|
|
||||||
|
|||||||
88
home-apps-session-summary.md
Normal file
88
home-apps-session-summary.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Session Summary - home-apps
|
||||||
|
**Date**: 2026-04-12
|
||||||
|
**Hostname**: home-apps
|
||||||
|
**Repository**: homelab-agents (shared)
|
||||||
|
|
||||||
|
## Session Overview
|
||||||
|
|
||||||
|
Debugging and fixing Emacs configuration to work correctly on the Linux VM
|
||||||
|
accessed via terminal from an iPad. Config is authored on a Mac and synced
|
||||||
|
to the VM via Syncthing.
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
|
||||||
|
### Emacs Init Error Fixed (flashcard-config.el)
|
||||||
|
- Identified `void-variable flash-card-mode-map` error on startup
|
||||||
|
- Root cause: mismatched parenthesis caused `(define-key flash-card-mode-map ...)`
|
||||||
|
to fall outside the `use-package` block and execute before the package loaded
|
||||||
|
- Fixed by moving the closing `)` to after the second `define-key`
|
||||||
|
|
||||||
|
### Cross-Platform Load Paths Fixed
|
||||||
|
- `flashcard-config.el` and `task-config.el` both referenced `~/config/sam_emacs_packages/`
|
||||||
|
which does not exist on this VM (packages live at `~/sam_emacs_packages/`)
|
||||||
|
- Applied the conditional `darwin`/Linux pattern:
|
||||||
|
```elisp
|
||||||
|
(add-to-list 'load-path (expand-file-name
|
||||||
|
(if (eq system-type 'darwin)
|
||||||
|
"~/config/sam_emacs_packages/<pkg>"
|
||||||
|
"~/sam_emacs_packages/<pkg>")))
|
||||||
|
```
|
||||||
|
|
||||||
|
### secrets.el Symlink Added
|
||||||
|
- `init.el` loads `secrets.el` via `user-emacs-directory` but no symlink existed
|
||||||
|
- Added: `~/.emacs.d/secrets.el` → `~/emacs_config/secrets.el`
|
||||||
|
|
||||||
|
### ELPA Package Visibility Fixed (ob-mermaid)
|
||||||
|
- On Mac, `~/.emacs.d` symlinks to `~/config/emacs_config` so packages install into
|
||||||
|
`~/emacs_config/elpa/`. On the VM, `~/.emacs.d/elpa/` is a separate real directory.
|
||||||
|
- Fixed by adding `~/emacs_config/elpa/` to `package-directory-list` in `package-setup.el`
|
||||||
|
before `(package-initialize)`, Linux-only
|
||||||
|
|
||||||
|
### mermaid-mode Added
|
||||||
|
- Added `mermaid-mode` alongside existing `ob-mermaid` in `org-base.el`
|
||||||
|
- Guarded by same `(when my/mmdc-path ...)` check — only loads if `mmdc` is available
|
||||||
|
- Reuses `my/mmdc-path` variable for cross-platform CLI path
|
||||||
|
|
||||||
|
### Puppeteer Sandbox Fix (VM only)
|
||||||
|
- `mmdc` uses headless Chromium which requires sandboxing — blocked on this Linux VM
|
||||||
|
- Created `~/.config/mermaid/puppeteer-config.json` with `{"args": ["--no-sandbox"]}`
|
||||||
|
- `org-base.el` detects this file at load time and sets `ob-mermaid-puppeteer-config`
|
||||||
|
and `mermaid-flags` accordingly; Mac is unaffected (file doesn't exist there)
|
||||||
|
|
||||||
|
### Notion Credentials Investigated
|
||||||
|
- "Notion Task DBID not set" error traced to credentials path resolution
|
||||||
|
- `notion-config.el` resolves path relative to parent of `user-emacs-directory`
|
||||||
|
(following symlinks): Mac → `~/config/credentials/`, VM → `~/credentials/`
|
||||||
|
- File confirmed present at `~/credentials/notion-credentials.env` — already synced
|
||||||
|
|
||||||
|
### .netrc Set Up for Gitea
|
||||||
|
- Bootstrap script at `https://gitea.pdmarf.co.uk` required authentication
|
||||||
|
- Created `~/.netrc` with API token for both the public domain and internal IP
|
||||||
|
(`100.120.125.113`) — git operations inside the bootstrap use the internal address
|
||||||
|
- Documented in `~/netrc-explainer.org`
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
- **Conditional load paths** rather than VM-only overrides — keeps one config file working on both platforms
|
||||||
|
- **`package-directory-list`** rather than symlinking elpa directories — safer, non-destructive
|
||||||
|
- **Puppeteer config file as feature flag** — presence of the file enables the workaround, absence is safe
|
||||||
|
- **`.netrc` for Gitea auth** — token stored once, not embedded in scripts or history
|
||||||
|
|
||||||
|
## Files Modified
|
||||||
|
|
||||||
|
| File | Change |
|
||||||
|
|------|--------|
|
||||||
|
| `my-packages/flashcard-config.el` | Fixed paren bug; conditional load path |
|
||||||
|
| `my-packages/task-config.el` | Conditional load path |
|
||||||
|
| `my-packages/package-setup.el` | Added `~/emacs_config/elpa` to `package-directory-list` on Linux |
|
||||||
|
| `my-packages/org-base.el` | Added `mermaid-mode`; Puppeteer config detection |
|
||||||
|
| `~/.emacs.d/secrets.el` | New symlink → `~/emacs_config/secrets.el` |
|
||||||
|
| `~/.config/mermaid/puppeteer-config.json` | New file, VM only |
|
||||||
|
| `~/.netrc` | New file, Gitea credentials |
|
||||||
|
| `~/netrc-explainer.org` | New documentation file |
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
- Restart Emacs on Mac to let `:ensure t` install `mermaid-mode` from MELPA
|
||||||
|
- Test `mermaid-compile` and Babel `#+begin_src mermaid` blocks on the iPad
|
||||||
|
- Verify Notion Tasks opens cleanly after credentials fix
|
||||||
Reference in New Issue
Block a user