Skip to content

nix: stop wrappers from owning user config#1919

Draft
johnrichardrinehart wants to merge 1 commit into
git-ai-project:mainfrom
johnrichardrinehart:repair/nix-build
Draft

nix: stop wrappers from owning user config#1919
johnrichardrinehart wants to merge 1 commit into
git-ai-project:mainfrom
johnrichardrinehart:repair/nix-build

Conversation

@johnrichardrinehart

@johnrichardrinehart johnrichardrinehart commented Jul 20, 2026

Copy link
Copy Markdown

This is draft until I have time to review alternative approaches

The Nix wrappers and Home Manager module both own ~/.git-ai/config.json. If Git runs after the managed link is removed, the wrapper creates a regular file and the next Home Manager activation fails rather than clobber it.

Pass the Nix store Git path through GIT_AI_GIT_PATH instead of writing user config. Mark the Home Manager file as forced so it can take over files left by older releases.

The new flake check runs both wrappers with an isolated home and verifies that they do not create config.json.


Open in Devin Review

The Nix wrappers create ~/.git-ai/config.json whenever it is absent, while the Home Manager module manages the same path as a store symlink. A Git command between link cleanup and activation leaves a regular file that makes Home Manager abort rather than clobber it.

Pass the Nix store Git path through the environment instead of writing user config. Let Home Manager force the one-time takeover of files left by older wrappers, and check that both wrappers run without creating config.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@johnrichardrinehart
johnrichardrinehart marked this pull request as draft July 21, 2026 01:16
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.

1 participant