cleo-darwin: local env updates
This commit is contained in:
@@ -52,6 +52,30 @@ in
|
||||
assume = "source $(brew --prefix)/bin/assume";
|
||||
};
|
||||
|
||||
programs.zsh.initContent = ''
|
||||
# Update tab title dynamically based on state
|
||||
update_starship_tab_title() {
|
||||
# 1. Respect Claude Code active sessions
|
||||
if [[ -n "$CLAUDE_CODE_ENTRYPOINT" || -n "$IN_CLAUDE_CODE" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# 2. Extract git branch if available
|
||||
local branch
|
||||
branch=$(git branch --show-current 2>/dev/null)
|
||||
|
||||
# 3. Output OSC escape sequence (Branch name or directory fallback)
|
||||
if [[ -n "$branch" ]]; then
|
||||
printf "\033]2;%s\007" "$branch"
|
||||
else
|
||||
printf "\033]2;%s\007" "''${PWD:t}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Hook into Starship's user function lifecycle
|
||||
starship_precmd_user_func="update_starship_tab_title"
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
CLAUDE_CONFIG_DIR = "${config.home.homeDirectory}/.config/claude";
|
||||
# Points to the Homebrew location mentioned in your caveat
|
||||
@@ -158,4 +182,14 @@ in
|
||||
disabled = false
|
||||
format = 'S: {{printf "%.0f" .BlockPct}}% ({{.BlockResets}}) | W: {{printf "%.0f" .WeeklyPct}}%'
|
||||
'';
|
||||
|
||||
xdg.configFile."1Password/ssh/agent.toml".text = lib.mkForce ''
|
||||
[[ssh-keys]]
|
||||
item = "Cleo SSH Key"
|
||||
vault = "Cleo"
|
||||
|
||||
[[ssh-keys]]
|
||||
item = "Personal SSH Key"
|
||||
vault = "Private"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user