From bf09e6cabb6eaf1a12fc0168c48add8c09f8e496 Mon Sep 17 00:00:00 2001 From: Matthew Bessette Date: Thu, 6 Aug 2026 11:36:21 -0400 Subject: [PATCH] cleo-darwin: local env updates --- caesium.home.nix | 2 +- cleo.darwin.nix | 1 + cleo.home.nix | 34 ++++++++++++++++++++++++++++++++++ home.shared.nix | 11 ++++++++++- 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/caesium.home.nix b/caesium.home.nix index 4ec1d93..0c4e275 100644 --- a/caesium.home.nix +++ b/caesium.home.nix @@ -1,4 +1,4 @@ -{ config, inputs, pkgs, ... }: { +{ config, inputs, lib, pkgs, ... }: { home.packages = with pkgs; [ firefox diff --git a/cleo.darwin.nix b/cleo.darwin.nix index 25c9757..287e7d8 100644 --- a/cleo.darwin.nix +++ b/cleo.darwin.nix @@ -25,6 +25,7 @@ let "rg" "snyk-cli" "sst/tap/opencode" + "ldcli" ## Excluded intentionally # "libpq@17" diff --git a/cleo.home.nix b/cleo.home.nix index 0ee1dfd..10efb8f 100644 --- a/cleo.home.nix +++ b/cleo.home.nix @@ -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" + ''; } \ No newline at end of file diff --git a/home.shared.nix b/home.shared.nix index d222597..0a801bd 100644 --- a/home.shared.nix +++ b/home.shared.nix @@ -17,6 +17,10 @@ in { home.sessionVariables.CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude"; xdg.enable = true; + xdg.configHome = "${config.home.homeDirectory}/.config"; + xdg.cacheHome = "${config.home.homeDirectory}/.cache"; + xdg.dataHome = "${config.home.homeDirectory}/.local/share"; + xdg.stateHome = "${config.home.homeDirectory}/.config/state"; xdg.configFile."ssh.conf".source = ./config.ssh.conf; xdg.configFile."claude/settings.json".source = ./config.claude.json; xdg.configFile."1Password/ssh/agent.toml".text = '' @@ -102,8 +106,13 @@ in { user.name = userConfig.gitName; user.email = userConfig.gitEmail; init.defaultBranch = "main"; - pull.rebase = false; + push.autoSetupRemote = true; + pull.rebase = true; core.sshCommand = "ssh"; + core.fsmonitor = true; + core.untrackedCache = true; + feature.manyFiles = true; + index.version = 4; }; };