feat(home): sync the OpenCode Go key after account switches
This commit is contained in:
1 parent
10f5811d7f
commit
633bbf35a0
3 files changed
+190
No files matched your search
@@ -41,6 +41,11 @@ in
|
||||
syntaxHighlighting.enable = true; # commands turn green when valid
|
||||
initContent = ''
|
||||
bindkey '^f' autosuggest-accept
|
||||
# Keep the OpenCode Go CLI, Pi, no-mistakes, and Hermes key aligned with
|
||||
# the desktop app login after an account switch.
|
||||
if [ -x "$HOME/.local/bin/opencode-go-key-sync" ]; then
|
||||
"$HOME/.local/bin/opencode-go-key-sync" >/dev/null 2>&1 || true
|
||||
fi
|
||||
'';
|
||||
shellAliases = {
|
||||
".." = "cd ..";
|
||||
@@ -168,6 +173,12 @@ in
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/bin/opencode-go-token";
|
||||
force = true;
|
||||
};
|
||||
# Copy the desktop app's OpenCode Go login into the CLI, Pi, and Hermes stores.
|
||||
# The app writes opencode.db only; those tools read auth.json and .env.
|
||||
home.file.".local/bin/opencode-go-key-sync" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/bin/opencode-go-key-sync";
|
||||
force = true;
|
||||
};
|
||||
# Codex 0.160+ profiles live in $CODEX_HOME/<name>.config.toml. The app does not
|
||||
# touch these, so they can be symlinked normally.
|
||||
home.file.".codex/luna.config.toml" = {
|
||||
|
||||
Reference in new issue
Block a user