Skip to content

chore(omp): manage config via dotfiles templates - #1221

Merged
shunkakinoki merged 3 commits into
mainfrom
chore/omp-dotfiles-config
Mar 20, 2026
Merged

chore(omp): manage config via dotfiles templates#1221
shunkakinoki merged 3 commits into
mainfrom
chore/omp-dotfiles-config

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Add dotfiles-managed OMP config under config/omp and wire it into the existing Nix config module list.

This keeps only ~/.omp/agent/config.yml under dotfiles control while leaving OMP runtime state such as databases and session files untouched. The Home Manager module uses copy semantics instead of symlinks so the tracked config behaves like other mutable CLI configs in this repo.

The OMP config also follows the existing models.json template convention by introducing config/omp/config.tpl.yml and adding it to scripts/llm-update.sh. The generated config keeps the default role on codex/GPT.

Additional context:

  • only the tracked config file is managed
  • runtime files under ~/.omp/agent remain unmanaged
  • config/default.nix now imports ./omp

Summary by cubic

Manage omp config via dotfiles using a Home Manager activation step that copies the tracked config to ~/.omp/agent/config.yml without touching runtime state. Adds a template wired to scripts/llm-update.sh for automatic regeneration.

  • New Features
    • Import ./omp in config/default.nix.
    • Copy config/omp/config.yml to ~/.omp/agent/config.yml on activation (no symlink); leave runtime files unmanaged; chmod 644.
    • Add config/omp/config.tpl.yml and map it in scripts/llm-update.sh; template keeps default role on codex/__GPT__.
    • Set doubleEscapeAction: none.

Written for commit 96842af. Summary will update on new commits.

@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a new OMP configuration module: includes it in the composed Nix config, adds template and final YAML configs, provides a Home Manager activation to deploy the config, and extends the template-processing script to generate the file.

Changes

Cohort / File(s) Summary
Module Registration
config/default.nix
Added ./omp to the list of included configuration modules so the OMP module is composed into the overall configuration.
OMP Configuration Files
config/omp/config.tpl.yml, config/omp/config.yml
New template and generated YAML config files introducing keys like lastChangelogVersion, modelRoles.default, display.showTokenUsage, theme.dark, steeringMode, followUpMode, interruptMode, doubleEscapeAction, and startup.quiet.
OMP Nix Module
config/omp/default.nix
New Nix/Home Manager module adding home.activation.ompConfig that creates ~/.omp/agent/, copies the tracked config.yml into ~/.omp/agent/config.yml, and sets permissions to 644, honoring dry-run semantics.
Template Processing Script
scripts/llm-update.sh
Added mapping to TEMPLATES to process config/omp/config.tpl.ymlconfig/omp/config.yml using existing placeholder substitution logic driven by models.json.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Script as llm-update.sh
    participant Repo as Repository (config/omp)
    participant HM as Home Manager activation
    participant FS as User FS (~/.omp/agent)

    Dev->>Repo: Add `config.tpl.yml`, `config.yml`, `default.nix`, update `config/default.nix`
    Script->>Repo: Read `config/omp/config.tpl.yml` + `models.json`
    Script->>Repo: Write substituted `config/omp/config.yml`
    HM->>Repo: Home Manager activation reads module `config/omp/default.nix`
    HM->>FS: Create `~/.omp/agent/` (after writeBoundary)
    HM->>FS: Copy module `config.yml` -> `~/.omp/agent/config.yml`
    HM->>FS: Set permissions to 0644
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A tiny config hops in place,
Templates spun with tidy grace,
Scripts and Nix align the trail,
Agent files land without fail,
Quiet startup — hop, rejoice! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore(omp): manage config via dotfiles templates' accurately reflects the main change: adding dotfiles-managed OMP configuration with template-based management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the purpose of adding dotfiles-managed OMP config, the Home Manager setup, template integration, and key implementation details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/omp-dotfiles-config
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request centralizes the management of OMP (Open Mind Platform) configuration within the existing dotfiles infrastructure. It introduces a dedicated Nix module to deploy OMP's config.yml using copy semantics, ensuring that only the tracked configuration is managed while leaving dynamic runtime files untouched. This change streamlines OMP setup and maintenance by integrating it seamlessly into the Home Manager configuration and the llm-update.sh templating system.

Highlights

  • OMP Configuration Management: Integrated OMP (Open Mind Platform) configuration into the dotfiles management system, centralizing its setup.
  • Nix/Home Manager Integration: Enabled OMP config deployment via Home Manager using copy semantics, ensuring only the tracked configuration is managed while leaving runtime state untouched.
  • Templating Convention: Established a templating convention for OMP configuration (config.tpl.yml), aligning with existing models.json patterns and processed by llm-update.sh.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 19, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Manage OMP configuration through dotfiles templates and Home Manager, ensuring the config is copied into ~/.omp/agent while leaving runtime state untouched, and enabling automatic regeneration via scripts/llm-update.sh.

What changed?

  • config/default.nix: Imports the new ./omp configuration module.
  • config/omp/config.tpl.yml: New template file for OMP, setting default lastChangelogVersion, modelRoles to codex/__GPT__, enabling showTokenUsage, setting dark-dracula theme, defining interaction modes (steeringMode, followUpMode, interruptMode), setting doubleEscapeAction to none, and startup.quiet.
  • config/omp/config.yml: New OMP configuration file with settings aligned to the template, including lastChangelogVersion, modelRoles, UI options, interaction modes, doubleEscapeAction, and startup.quiet.
  • config/omp/default.nix: New NixOS module that copies config.yml to ~/.omp/agent/config.yml with specific permissions, replacing the previous symlinking approach for better management of tracked config files.
  • scripts/llm-update.sh: Updated to include the OMP configuration (config/omp/config.yml) in its template mappings, using config/omp/config.tpl.yml.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configuration management for OMP via dotfiles templates, which is a good addition. The changes are well-structured, adding a new Nix module for OMP, a configuration template, and integrating it with the existing llm-update.sh script. My review found one area for improvement in the Nix activation script for better robustness. Overall, the changes are clear and follow the repository's conventions.

Comment thread config/omp/default.nix
Comment on lines +6 to +8
$DRY_RUN_CMD mkdir -p ~/.omp/agent
$DRY_RUN_CMD cp -f ${./config.yml} ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 644 ~/.omp/agent/config.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better robustness in shell scripting within Nix expressions, it's preferable to use the $HOME environment variable instead of the tilde ~ for referring to the user's home directory. While ~ often works, $HOME is more explicit and less prone to expansion issues in certain shell contexts. Quoting the path is also a good practice to handle potential special characters.

    $DRY_RUN_CMD mkdir -p "$HOME"/.omp/agent
    $DRY_RUN_CMD cp -f ${./config.yml} "$HOME"/.omp/agent/config.yml
    $DRY_RUN_CMD chmod 644 "$HOME"/.omp/agent/config.yml

@shunkakinoki
shunkakinoki marked this pull request as ready for review March 20, 2026 00:01
Copilot AI review requested due to automatic review settings March 20, 2026 00:01
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 20, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds dotfiles-managed configuration for OMP under config/omp, wires it into the existing Nix config import list, and integrates it into the repo’s template→generated-config workflow via scripts/llm-update.sh.

Changes:

  • Add config/omp Home Manager module that copies a tracked OMP config into ~/.omp/agent/config.yml on activation (no symlink).
  • Introduce config/omp/config.tpl.yml and generate config/omp/config.yml via scripts/llm-update.sh.
  • Import ./omp from config/default.nix to enable the module.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/llm-update.sh Adds template mapping to generate config/omp/config.yml from config.tpl.yml.
config/omp/default.nix New HM activation script to copy OMP config into ~/.omp/agent/.
config/omp/config.yml Generated concrete OMP config (post-template substitution).
config/omp/config.tpl.yml Template OMP config using __GPT__ placeholder for model selection.
config/default.nix Imports ./omp so the new module is activated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config/omp/default.nix
Comment on lines +7 to +8
$DRY_RUN_CMD cp -f ${./config.yml} ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 644 ~/.omp/agent/config.yml

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The activation script installs the OMP config with mode 644, which makes it world-readable if the user's home directory is not 0700. If this file can ever contain tokens/identifiers (now or in future OMP versions), this is an avoidable information exposure; prefer chmod 600 (matching config/codex/default.nix) and consider also tightening directory perms if needed.

Suggested change
$DRY_RUN_CMD cp -f ${./config.yml} ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 644 ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 700 ~/.omp/agent
$DRY_RUN_CMD cp -f ${./config.yml} ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 600 ~/.omp/agent/config.yml

Copilot uses AI. Check for mistakes.
Comment thread config/omp/config.tpl.yml
@@ -0,0 +1,12 @@
lastChangelogVersion: 13.13.2
modelRoles:
default: codex/__GPT__

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the generated config keeps the default role on codex/__GPT__, but scripts/llm-update.sh replaces __GPT__ placeholders with the concrete value from models.json (so the generated config.yml becomes codex/gpt-5.4). Please update the PR description or adjust the template/substitution behavior if you intended the placeholder to remain in the generated file.

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
config/omp/config.tpl.yml (1)

1-1: Add a provenance header to reduce generated-file drift.

A brief comment here makes it explicit that config/omp/config.yml is generated and should not be edited directly.

Proposed change
+ # Template source for config/omp/config.yml (generated via scripts/llm-update.sh).
+ # Edit this file, then regenerate.
  lastChangelogVersion: 13.13.2
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/omp/config.tpl.yml` at line 1, Add a short provenance header comment
at the top of the template file to indicate that config/omp/config.yml is
generated and must not be edited directly; update config/omp/config.tpl.yml by
inserting a brief human-readable comment above the existing key (e.g., above
lastChangelogVersion) that states the file is generated, lists the generator or
template name and optionally the generation timestamp or commit id to reduce
churn in generated-file diffs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@config/omp/config.tpl.yml`:
- Line 1: Add a short provenance header comment at the top of the template file
to indicate that config/omp/config.yml is generated and must not be edited
directly; update config/omp/config.tpl.yml by inserting a brief human-readable
comment above the existing key (e.g., above lastChangelogVersion) that states
the file is generated, lists the generator or template name and optionally the
generation timestamp or commit id to reduce churn in generated-file diffs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 257475ae-93be-4155-aca7-558e9e8bd02d

📥 Commits

Reviewing files that changed from the base of the PR and between 12ee0cc and b2425d2.

📒 Files selected for processing (5)
  • config/default.nix
  • config/omp/config.tpl.yml
  • config/omp/config.yml
  • config/omp/default.nix
  • scripts/llm-update.sh

@shunkakinoki
shunkakinoki merged commit 355bf17 into main Mar 20, 2026
37 of 39 checks passed
@shunkakinoki
shunkakinoki deleted the chore/omp-dotfiles-config branch March 20, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants