スキル一覧に戻る
moogah

machine-specific-config

by moogah

0🍴 0📅 2026年1月18日
GitHubで見るManusで実行

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

TaskHowDetails
Check hostname(system-name) in EmacsReturns current hostname
Machine variablejf/machine-nameStores detected hostname
Config fileemacs/local/{hostname}.elAuto-loaded during init
Create overrideCreate file, add setq/configRestart Emacs to load

Configuration Pattern

Setup New Machine

  1. Check hostname: Eval (system-name) in Emacs
  2. Create file: emacs/local/{hostname}.el
  3. Add overrides (see examples below)
  4. 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

CategoryExamples
Org-roamorg-roam-dailies-directory, org directories, capture templates
File PathsDocument roots, project workspaces, backup directories
PackagesDifferent configs for work/home, integrations, dev tools
DisplayMonitor 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

  1. Core modules (from jf/enabled-modules)
  2. All standard modules
  3. 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

MistakeWhy BadFix
Wrong hostnameFile won't loadUse exact output of (system-name)
Too many overridesHard to maintainOnly override what's different
No documentationForget why override existsComment purpose of overrides
Secrets in fileSecurity riskKeep credentials out of repo
Duplicating base configMaintenance burdenOverride 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

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です