Add langdock api key env var on work mode
This commit is contained in:
@@ -88,5 +88,14 @@ in
|
||||
|
||||
# Link the generated config to the expected location
|
||||
xdg.configFile."opencode/opencode.json".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."opencode/opencode.json".path;
|
||||
|
||||
# Export the decrypted langdock API key as an env var (work config only).
|
||||
# The secret lives in a runtime file, so we read it at shell startup rather
|
||||
# than baking it into the Nix store via home.sessionVariables.
|
||||
programs.zsh.initContent = lib.mkIf cfg.workMode ''
|
||||
if [ -r "${config.sops.secrets.langdock_api_key.path}" ]; then
|
||||
export LANGDOCK_API_KEY="$(cat "${config.sops.secrets.langdock_api_key.path}")"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user