← Back to list

machine-specific-config
by moogah
⭐ 0🍴 0📅 Jan 18, 2026
SKILL.md
name: machine-specific-config description: Use when setting up dotfiles on new machines or creating hostname-based configuration overrides for work/home/different environments
Machine-Specific Configuration Management
Overview
Multi-Machine Support: Same dotfiles repo works across multiple machines using hostname detection and automatic config overrides.
Core principle: Detect hostname → auto-load local/{hostname}.el → apply machine-specific overrides
When to Use
Use this skill when:
- Setting up dotfiles on a new machine
- Creating machine-specific settings
- Debugging why config differs between machines
- Understanding which hostname config is active
- Separating work/home/personal configurations
Quick Reference
| Task | How | Details |
|---|---|---|
| Check hostname | (system-name) in Emacs | Returns current hostname |
| Machine variable | jf/machine-name | Stores detected hostname |
| Config file | emacs/local/{hostname}.el | Auto-loaded during init |
| Create override | Create file, add setq/config | Restart Emacs to load |
Configuration Pattern
Setup New Machine
- Check hostname: Eval
(system-name)in Emacs - Create file:
emacs/local/{hostname}.el - Add overrides (see examples below)
- Restart Emacs (changes load automatically)
Override Examples
;; emacs/local/Mac.home.el
;; Machine-specific org-roam dailies
(setq org-roam-dailies-directory "dailies/Mac.home/")
;; Local paths
(setq my-documents-path "/Users/jefffarr/Documents/")
;; Machine-specific keybindings
(global-set-key (kbd "C-c h") 'home-function)
;; Package config override
(use-package some-package
:config
(setq package-setting 'home-value))
Common Machine-Specific Settings
| Category | Examples |
|---|---|
| Org-roam | org-roam-dailies-directory, org directories, capture templates |
| File Paths | Document roots, project workspaces, backup directories |
| Packages | Different configs for work/home, integrations, dev tools |
| Display | Monitor settings, font sizes, themes, window rules |
Multi-Environment Strategy
Environment Types
- Work machines: Work org-roam, work packages
- Personal machines: Home directories, personal tools
- Cross-platform: Platform-specific paths/packages
Load Order
- Core modules (from
jf/enabled-modules) - All standard modules
- Machine config (automatic from
local/{hostname}.el)
Debugging
Check current machine:
- Variable:
C-h v jf/machine-name - Returns: Current hostname
File not loading:
- Verify filename matches hostname exactly
- Check file exists in
emacs/local/directory - Restart Emacs after creating file
Override not working:
- Machine configs load last (correct)
- Verify variable name is correct
- Check for typos in hostname
Common Mistakes
| Mistake | Why Bad | Fix |
|---|---|---|
| Wrong hostname | File won't load | Use exact output of (system-name) |
| Too many overrides | Hard to maintain | Only override what's different |
| No documentation | Forget why override exists | Comment purpose of overrides |
| Secrets in file | Security risk | Keep credentials out of repo |
| Duplicating base config | Maintenance burden | Override minimally |
Best Practices
- Minimal overrides: Only change what's actually different
- Document purpose: Comment why settings are machine-specific
- No secrets: Keep API keys and credentials out
- Logical grouping: Keep related overrides together
- Test isolation: Verify base config still works without overrides
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon