Skip to content

Commit 55ce452

Browse files
committed
docs: add desktop profile and update documentation
- Add desktop profile to .chezmoi.toml.tmpl with is_desktop variable - Document desktop profile in profiles.yaml - Update CLAUDE.md with: - Never run chezmoi directly warning - Never auto-commit policy - Home Assistant integration docs - Reference to OpenDeck README
1 parent 8de729a commit 55ce452

3 files changed

Lines changed: 104 additions & 1 deletion

File tree

.chezmoi.toml.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{{- $profile := promptString "profile" -}}
22
{{- $include_defaults := true -}}
3+
{{- $is_desktop := false -}}
34
{{- if eq $profile "default" -}}
45
{{- $include_defaults = true -}}
56
{{- else if eq $profile "onXmaps" -}}
67
{{- $include_defaults = true -}}
8+
{{- else if eq $profile "desktop" -}}
9+
{{- $include_defaults = true -}}
10+
{{- $is_desktop = true -}}
711
{{- end -}}
812
[data]
913
profile = {{ $profile | quote }}
1014
include_defaults = {{ $include_defaults }}
15+
is_desktop = {{ $is_desktop }}
1116

1217
[diff]
1318
pager = "less"

CLAUDE.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
**⚠️ WARNING: This is a PUBLIC repository! Never commit personal information, credentials, API keys, or proprietary content to this repository.**
44

5+
## Running Dotfiles
6+
7+
**CRITICAL: NEVER run `chezmoi` directly. ALWAYS use `./install.sh` to apply changes.**
8+
9+
```bash
10+
# Correct - always use this:
11+
./install.sh
12+
13+
# WRONG - never do this:
14+
chezmoi apply # NO!
15+
```
16+
17+
The install script handles chezmoi installation, profile detection, and proper initialization. Running chezmoi directly will fail or produce incorrect results.
18+
19+
## Git Commits
20+
21+
**NEVER automatically commit changes to this repository.** Always wait for explicit user approval before committing. Present the changes and ask if they should be committed.
22+
523
## Installation Hierarchy
624

725
1. **chezmoi first**: Always use chezmoi for installations and configuration management
@@ -171,6 +189,70 @@ Claude Code automatically manages marketplace updates. The repository in `~/.cla
171189
- Repository is owned by you and fully under your control
172190
- Never commit sensitive data to plugin repositories
173191

192+
## Home Assistant Integration (Desktop Profile)
193+
194+
The OpenDeck Stream Deck configuration includes Home Assistant integration for controlling lights via the second encoder knob.
195+
196+
For OpenDeck profile format details (encoder context format, button layout), see `dot_config/opendeck/README.md`.
197+
198+
### Credentials Storage
199+
200+
**IMPORTANT**: Home Assistant credentials are stored locally and are NOT managed by chezmoi or committed to the repository.
201+
202+
Credentials are stored at: `~/.config/home-assistant/credentials`
203+
204+
This file contains:
205+
```bash
206+
HA_URL="http://your-ha-instance:8123"
207+
HA_TOKEN="your_long_lived_access_token"
208+
HA_LIGHT_ENTITY="light.your_light_entity"
209+
```
210+
211+
### Setup
212+
213+
During `chezmoi apply`, you'll be prompted for Home Assistant credentials if not already configured:
214+
215+
1. **Home Assistant URL**: Your HA instance URL (e.g., `http://192.168.1.100:8123`)
216+
2. **Long-lived access token**: Create one in HA under Profile → Long-Lived Access Tokens
217+
3. **Light entity ID**: The entity you want to control (e.g., `light.office`)
218+
219+
You can skip the prompt (Ctrl+C) and configure later by creating the credentials file manually.
220+
221+
### Stream Deck Controls
222+
223+
- **Encoder 1 (left)**: Volume control - rotate to adjust, press to mute
224+
- **Encoder 2**: Light control - rotate to dim, press to toggle on/off
225+
226+
### Manual Configuration
227+
228+
If you skipped the interactive setup or need to update credentials:
229+
230+
```bash
231+
mkdir -p ~/.config/home-assistant
232+
cat > ~/.config/home-assistant/credentials << 'EOF'
233+
HA_URL="http://your-ha-instance:8123"
234+
HA_TOKEN="your_long_lived_access_token"
235+
HA_LIGHT_ENTITY="light.your_light_entity"
236+
EOF
237+
chmod 600 ~/.config/home-assistant/credentials
238+
```
239+
240+
### Getting a Long-Lived Access Token
241+
242+
1. Open your Home Assistant instance
243+
2. Click your profile (bottom left)
244+
3. Scroll to "Long-Lived Access Tokens"
245+
4. Click "Create Token"
246+
5. Give it a name (e.g., "Stream Deck")
247+
6. Copy the token immediately (it won't be shown again)
248+
249+
### Security Notes
250+
251+
- Credentials file has 600 permissions (owner read/write only)
252+
- The `~/.config/home-assistant/` directory is NOT managed by chezmoi
253+
- Never commit credentials to any repository
254+
- The token grants full API access to your HA instance - keep it secure
255+
174256
## Testing
175257

176258
### Testing Workflow

profiles.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,20 @@ profiles:
2020
- node (via mise)
2121
- npm (via mise)
2222
packages:
23-
- none (Claude Code should be installed separately)
23+
- none (Claude Code should be installed separately)
24+
25+
desktop:
26+
description: Desktop profile for CachyOS/Arch Linux with Hyprland
27+
include_defaults: true
28+
is_desktop: true
29+
features:
30+
- claude marketplace configuration
31+
- Hyprland window manager config
32+
- OpenDeck Stream Deck support
33+
- Home Assistant integration
34+
- Arch package management
35+
tools:
36+
- node (via mise)
37+
- npm (via mise)
38+
packages:
39+
- declarative via .chezmoidata/packages.yaml

0 commit comments

Comments
 (0)