mirror of
https://github.com/openclaw/nix-openclaw.git
synced 2026-07-25 05:35:30 -04:00
[PR #51] fix: set force=true on config home.file to prevent clobber errors #53
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openclaw/nix-openclaw/pull/51
Author: @ioitiki
Created: 2/8/2026
Status: 🔄 Open
Base:
main← Head:fix/config-file-force-nix-mode📝 Commits (3)
9a33d71fix: set force=true on config home.file to prevent clobber errorsceec748Merge branch 'openclaw:main' into fix/config-file-force-nix-mode094ca85Merge branch 'openclaw:main' into fix/config-file-force-nix-mode📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
nix/modules/home-manager/openclaw/config.nix(+1 -1)📄 Description
Summary
force = trueon thehome.fileentry foropenclaw.jsonso home-manager overwrites it unconditionallyhome-manager switchfailing with "Existing file would be clobbered" after the gateway replaces the nix store symlink with a regular fileRoot cause
The gateway's
applyPluginAutoEnableruns on startup and callswriteConfigFile()even whenOPENCLAW_NIX_MODE=1is set. This replaces the read-only nix store symlink with a regular file. On the nexthome-manager switch, thecheckLinkTargetsstep fails because it refuses to overwrite an unmanaged regular file.The
isNixModeguard exists for legacy config migration but is missing from the plugin auto-enable code path. This PR works around that by telling home-manager it's safe to overwrite.Test plan
openclaw-config-validity,openclaw-hm-activation) are unaffected — they access.text, notforcehome-manager switchafter gateway has replaced the symlink — should succeed without-b backupFixes #50
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.