Chezmoi asks for the machine role before identity or feature choices. The server path is optimized for VPS machines that host services and are not used as daily workstations.
Run:
chezmoi init --apply https://github.com/chianyungcode/dotfiles.gitChoose server for the first question. A fresh server then asks only:
- whether to enable development tools;
- whether to enable homelab tools.
Chezmoi stores these values automatically:
[data.identity]
profile = "server-minimal"
git_name = "chianyungcode-server"
git_email = "chianyungcode-server@local.invalid"
github_username = ""
signing_key = ""
github_token = ""
[data.features]
personal = false
graphical = false
[data.secrets]
provider = "none"
[data.encrypted_files]
enabled = falsedevelopment and homelab retain the answers selected during initialization.
The server identity supports unsigned local Git and Jujutsu commits. It does not provide a GitHub token, signing key, or push credential.
Inspect the active identity:
chezmoi data | jq '.machine, .identity, .features, .secrets, .encrypted_files'
git config --global --get-regexp '^user\.'
jj config list user
jj config list signingMove an emergency Git commit to a workstation with a patch:
git format-patch -1 HEAD --stdout > emergency.patchCopy emergency.patch to the workstation, inspect it, and apply it:
git am emergency.patchThe patch preserves chianyungcode-server as the author. The workstation
identity becomes the committer.
Public clone and pull operations do not need credentials. If a server must read
a private repository, provision a separate read-only deploy key. Do not add a
personal GitHub token to server-minimal.
The profile does not technically block pushes. Existing SSH credentials or agent forwarding can still authorize one, so avoid forwarding write-capable credentials to hosting servers.
Server initialization sets personal and graphical to false without
prompting. An exceptional graphical server can be enabled after initialization
by editing the generated Chezmoi config:
[data.features]
graphical = trueTemplates continue to use features.graphical, so the override is honored.
Running server initialization again restores graphical = false.
An ordinary chezmoi apply does not regenerate the Chezmoi config. To adopt
the new identity, re-run initialization:
chezmoi init
chezmoi applyReview the result before applying:
chezmoi data | jq '.machine, .identity, .features, .secrets, .encrypted_files'
chezmoi apply --dry-run --verboseNo migration script rewrites existing machines automatically.
machine.role uses prompt-once state. To convert an existing machine, edit or
remove the stored role in the Chezmoi config, then run:
chezmoi init --promptWhen changing to server, Chezmoi replaces the prior identity with
server-minimal. When changing to workstation, Chezmoi rejects
server-minimal for that role and asks for personal, secondary, or
custom.