Skip to content
ccroncaPublic

About

A set of zsh, git, bash, Claude and tmux configuration files

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Dotfiles

Personal configuration files for shell, vim, git, and development tools.

Installation

Clone the repository to your home directory:

git clone https://github.com/ccronca/dotfiles.git ~/dotfiles
cd ~/dotfiles

Run the installation script:

./makesymlinks.sh

This script will:

  • Back up existing dotfiles to ~/dotfiles_old/
  • Create symlinks from your home directory to the dotfiles repository
  • Set up vim directories (backups, swaps, undo)
  • Install and update vim plugins (CtrlP, Tagbar)
  • Configure OpenCode settings (symlinks config files and commands)

What's Included

  • Shell configs: bashrc, zshrc, aliases, bash_profile, bash_logout
  • Git: gitconfig, gitconfig-github, gitignore — the default git identity is the GitHub one; includeIf picks gitconfig-github for ~/repositories/github/ and a work config (kept in a private repo) for ~/repositories/gitlab/
  • Vim: vimrc, ctags configuration
  • Tmux: tmux.conf
  • OpenCode: settings, commands, agent instructions
  • MCP Servers: User-level MCP configuration (mcp.json → ~/.mcp.json) for Obsidian vaults

OpenCode Configuration

The OpenCode configuration is handled by setup_opencode_config.sh:

  • Symlinked files: opencode.jsonc, dcp.jsonc, AGENTS.md
  • Symlinked directories: agents/, skills/
  • Commands and plugins: commands/ and plugins/ in ~/.config/opencode are real directories of per-file symlinks, so entries from a private dotfiles repo can live alongside the public ones

The public config intentionally does not pin models or providers — model selection stays in your private, machine-local config.

To manually update OpenCode configuration only:

./setup_opencode_config.sh

RTK Integration

opencode/plugins/rtk.ts rewrites common shell commands (git, ls, grep, test runners) through rtk to cut token usage. setup_opencode_config.sh installs the rtk binary automatically if it is missing.

Manual install:

curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
# or: brew install rtk

systemd user services

setup_systemd_config.sh symlinks units from systemd/user/ into ~/.config/systemd/user/, helper scripts into ~/.local/bin/, runs systemctl --user daemon-reload and enables the units. Real files already present in ~/.config/systemd/user/ are left untouched.

dotfiles-secrets.service decrypts ~/.config/creds.d/*.cred (TPM2-encrypted via systemd-creds) into a tmpfs cache (${XDG_RUNTIME_DIR}/dotfiles-secrets.env) at login; zshrc/bashrc source that cache and delegate rebuilds back to the service. File-based credentials work too: ~/.config/creds.d/files/*.cred are decrypted to ${XDG_RUNTIME_DIR}/dotfiles-secrets-files/ — used for the AWS credentials INI, referenced by AWS_SHARED_CREDENTIALS_FILE in ~/.env.

Add a secret:

printf '%s' 'the-token' | systemd-creds encrypt --user - ~/.config/creds.d/NEWVAR.cred
systemctl --user restart dotfiles-secrets.service   # or just open a new shell

rotate-gitlab-token.timer rotates the GitLab personal access token every 5 days (re-encrypting it into creds.d and refreshing the cache). On failure the script sends a critical desktop notification and the unit retries every 30 minutes, bounded to 8 attempts per 6h window.

MCP Server Configuration

The repository includes user-level MCP configuration in mcp.json (symlinked to ~/.mcp.json) for Obsidian vault integration.

Note: Due to a bug in mcp-obsidian (see PR #89), only one vault can be configured at a time.

To use the MCP server, add your Obsidian API key as an encrypted credential — it is decrypted into the tmpfs cache at login and exported to every shell (see "systemd user services" below):

printf '%s' 'your_actual_key' | systemd-creds encrypt --user - ~/.config/creds.d/OBSIDIAN_MYJOURNAL_API_KEY.cred

Non-secret configuration (vault path, URLs) lives in ~/.env — see .env.example.

Google Calendar Integration

The repository includes a /calendar-journal command for generating meeting summaries from Google Calendar.

Setup gcalcli

Install and configure gcalcli following the official documentation.

The first run will prompt for OAuth authorization to access your Google Calendar.

Using the Calendar Journal Command

Generate meeting summaries and save them to your Obsidian vault:

# Today's meetings
/calendar-journal

# This week's meetings
/calendar-journal week

# Specific date
/calendar-journal 2025-11-25

The command will:

  • Fetch events from Google Calendar using gcalcli
  • Analyze meeting patterns and time distribution
  • Generate a summary with statistics and observations
  • Save to Journal/Calendar/YYYY-MM-DD.md in Obsidian vault
  • Add appropriate tags for searchability

AI Prompt Rewriter Integration

The repository includes a prompt rewriting feature that improves your prompts for better clarity and grammar using the ai-rewriter service.

Setup ai-rewriter

  1. Clone and set up the ai-rewriter service:

    git clone https://github.com/ccronca/ai-rewriter.git
    cd ai-rewriter
    # Follow the setup instructions in the repository
  2. Start the ai-rewriter service (default port: 8787):

    # The service should be running on http://127.0.0.1:8787

Using the Prompt Rewriter

Two ways to trigger prompt rewriting:

  1. Using #rw prefix - Automatic hook-based rewriting:

    #rw how I can make this project better?
    
  2. Using /rw command - Explicit slash command:

    /rw how I can make this project better?
    

Both methods will:

  • Send your prompt to the ai-rewriter service
  • Show you the original and improved versions
  • Highlight key improvements (grammar, clarity, structure)
  • Respond to the improved prompt

This feature helps you learn English by showing concrete examples of improvements.

Manual Setup

If you prefer to set up components individually, you can run scripts separately or manually symlink specific files.

To remove the Claude Code and Gemini CLI setup from a machine, run ./uninstall_claude_gemini.sh.

About

A set of zsh, git, bash, Claude and tmux configuration files

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages