[PR #13] feat: add generic secretEnv option for provider API keys #41

Open
opened 2026-02-15 17:04:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/nix-openclaw/pull/13
Author: @andreabadesso
Created: 1/25/2026
Status: 🔄 Open

Base: mainHead: feat/secret-env


📝 Commits (1)

  • cf4af02 feat: add generic secretEnv option for provider API keys

📊 Changes

1 file changed (+47 additions, -2 deletions)

View changed files

📝 nix/modules/home-manager/clawdbot.nix (+47 -2)

📄 Description

Add a flexible secretEnv option that maps environment variable names to secret file paths. The gateway wrapper reads each file at runtime and exports the env var.

Example usage:

secretEnv = {
  ZAI_API_KEY = "/run/secrets/zai_key";
  OPENAI_API_KEY = "/run/secrets/openai_key";
};

This replaces the need for provider-specific options like providers.anthropic.apiKeyFile (now deprecated but still supported for backwards compatibility).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/nix-openclaw/pull/13 **Author:** [@andreabadesso](https://github.com/andreabadesso) **Created:** 1/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/secret-env` --- ### 📝 Commits (1) - [`cf4af02`](https://github.com/openclaw/nix-openclaw/commit/cf4af0266f9c1e8cca29595ba15d74378c827f1e) feat: add generic secretEnv option for provider API keys ### 📊 Changes **1 file changed** (+47 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `nix/modules/home-manager/clawdbot.nix` (+47 -2) </details> ### 📄 Description Add a flexible secretEnv option that maps environment variable names to secret file paths. The gateway wrapper reads each file at runtime and exports the env var. Example usage: ``` secretEnv = { ZAI_API_KEY = "/run/secrets/zai_key"; OPENAI_API_KEY = "/run/secrets/openai_key"; }; ``` This replaces the need for provider-specific options like `providers.anthropic.apiKeyFile` (now deprecated but still supported for backwards compatibility). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:04:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#41