| name | machine-profiles |
| description | Use dotfile-sync profiles to manage machine-specific configurations. Use when different machines need different subsets of dotfiles, handling OS-specific configs, or setting up work vs personal machine profiles. Triggers include "machine profile", "per-machine config", "dfs profile", "different configs per machine", "work vs home dotfiles". |
machine-profiles
Guide to using dotfile-sync profiles for machine-specific configuration.
What Profiles Are
Profiles let different machines use different subsets of your dotfiles. For example:
- Work MacBook: company SSH config, work tool configs
- Home Linux: gaming tools, personal projects
- Both machines: zshrc, gitconfig, nvim config
Creating a Profile
dfs profile create work-mac
dfs profile create home-linux
Adding Files to a Profile
dfs add ~/.config/work-vpn/config --profile work-mac
dfs add ~/.config/company-ssh/config --profile work-mac
dfs add ~/.zshrc
dfs add ~/.gitconfig
Applying a Profile
On a new machine or when switching profiles:
dfs profile apply work-mac
dfs init --clone git@github.com:user/dotfiles.git --profile work-mac
Profile File Structure
Profiles are stored in the dotfiles repo at profiles/<name>.json:
{
"name": "work-mac",
"description": "work MacBook configuration",
"files": [
"home/.config/work-vpn/config",
"home/.config/company-ssh/config"
]
}
Listing Profiles
dfs profile list
Output shows all profiles with file counts and marks the currently active profile with *.
Common Profile
All files tracked without a --profile flag belong to the common profile. These files are always linked regardless of which machine profile is active.
Workflow Example
dfs profile create work-mac
dfs add ~/.zshrc
dfs add ~/.gitconfig
dfs add ~/.config/work-vpn/config --profile work-mac
dfs push
dfs init --clone git@github.com:user/dotfiles.git --profile home-linux