Skip to content

Repository files navigation

dotfiles

Dotfiles managed with chezmoi.

This setup uses two separate chezmoi source states:

Main Repo
  generic / shared configuration

Secrets Repo
  encrypted / host-specific configuration

The separation keeps secrets out of the main repository while still allowing both repositories to behave like full chezmoi source states.

Prerequisites

chezmoi
git
age

Optional:

zsh
tmux
nvim

Main Repository

Initialize the generic dotfiles repository:

chezmoi init https://github.com/0x4D616E75/dotfiles.git
chezmoi apply

git@github.com:0x4D616E75/dotfiles.git

This creates the default chezmoi source state at:

~/.local/share/chezmoi

Reload ZSH to enable convenience functions (cm):

source ~/.zshrc

Secrets Repository

Clone the secrets repository separately:

git clone https://github.com/0x4D616E75/example-dotfiles-secrets.git ~/.local/share/chezmoi-secrets

Create a separate chezmoi config directory:

mkdir -p ~/.config/chezmoi-secrets

Example config:

# ~/.config/chezmoi-secrets/chezmoi.toml

encryption = "age"

[age]
identity = "~/.config/chezmoi-secrets/key.txt"

Add the age identity:

mkdir -p ~/.config/chezmoi-secrets
chmod 700 ~/.config/chezmoi-secrets

$EDITOR ~/.config/chezmoi-secrets/key.txt

chmod 600 ~/.config/chezmoi-secrets/key.txt

Reload ZSH again to enable convenience functions (cms):

source ~/.zshrc

Apply the secrets repo:

cms apply

Usage

Generic dotfiles:

cm status
cm diff
cm add ~/.zshrc
cm apply

Secrets:

cms status
cms diff
cms add ~/.ssh/config
cms apply

Zed Local Settings

Zed settings are rendered from a chezmoi template. Host-specific model configuration can be placed in the local chezmoi config directory:

$EDITOR ~/.config/chezmoi/zed-settings.jsonc

Example:

{
  // Optional. Defaults to "write" if omitted.
  "agent_default_profile": "ask",

  "default_model": {
    "provider": "osaurus",
    "model": "openai-chatgpt/gpt-5.5",
  },

  "commit_message_model": {
    "provider": "osaurus",
    "model": "lfm2.5-8b-a1b-mxfp8",
  },

  "openai_compatible": {
    "osaurus": {
      "api_url": "http://localhost:1337",
      "available_models": [
        {
          "name": "lfm2.5-8b-a1b-mxfp8",
          "max_tokens": 128000,
        },
        {
          "name": "openai-chatgpt/gpt-5.5",
          "max_tokens": 1050000,
          "max_output_tokens": 128000,
        },
      ],
    },
  },
}

This file stays local and keeps provider URLs, model names, and other host-specific Zed settings out of the generic dotfiles repository.

After changing it, re-render the Zed settings with:

cm diff ~/.config/zed/settings.json
cm apply ~/.config/zed/settings.json

Recommended Separation

Main repo:

~/.zshrc
~/.vimrc
~/.tmux.conf
~/.config/nvim

Secrets repo:

~/.zshenv
~/.ssh/config
~/.ssh/id_ed25519
tokens
host-specific configuration

Avoid managing the same target file in both repositories.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages