Add externalConfig option to support external openclaw.json files#59
Open
TorosFanny wants to merge 2 commits intoopenclaw:mainfrom
Open
Add externalConfig option to support external openclaw.json files#59TorosFanny wants to merge 2 commits intoopenclaw:mainfrom
TorosFanny wants to merge 2 commits intoopenclaw:mainfrom
Conversation
added 2 commits
February 19, 2026 11:51
- Add 'externalConfig' option in options-instance.nix for specifying external config - Update config.nix to read external config file instead of generating from Nix options - Supports both path and string types for flexibility This allows users to use external openclaw.json files (e.g., with matrix config) instead of being limited to the Nix-generated config options.
- Change externalConfig type to only accept string (not path) - Add validation to prevent using both 'config' and 'externalConfig' - Simplify config.nix logic by removing path handling - Update option description to clarify mutual exclusivity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
externalConfigoption to the nix-openclaw home-manager module, allowing users to specify an externalopenclaw.jsonfile instead of generating config solely from Nix options.Motivation
The nix-openclaw module generates
openclaw.jsonfrom Nix code using schema-typed options. However, some channels (like Matrix) are not yet supported in the generated options. Users who need these unsupported channels must either:openclaw.jsonoutside of home-manager (risk of being overwritten)This PR provides a third option: use an external
openclaw.jsonfile directly while still benefiting from home-manager's declarative configuration.Changes
Add
externalConfigoption inoptions-instance.nix:nullOr strbuiltins.readFileto read from file)Update
config.nixto:externalConfigis setconfigandexternalConfigsimultaneouslyUsage Example
Backwards Compatibility
This change is fully backwards compatible. Existing configurations using
config = { ... }will continue to work without any modifications.