cleo-darwin: local env updates

This commit is contained in:
Matthew Bessette
2026-08-06 11:36:21 -04:00
parent 6598947a52
commit bf09e6cabb
4 changed files with 46 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{ config, inputs, pkgs, ... }: { { config, inputs, lib, pkgs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
firefox firefox
+1
View File
@@ -25,6 +25,7 @@ let
"rg" "rg"
"snyk-cli" "snyk-cli"
"sst/tap/opencode" "sst/tap/opencode"
"ldcli"
## Excluded intentionally ## Excluded intentionally
# "libpq@17" # "libpq@17"
+34
View File
@@ -52,6 +52,30 @@ in
assume = "source $(brew --prefix)/bin/assume"; 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 = { home.sessionVariables = {
CLAUDE_CONFIG_DIR = "${config.home.homeDirectory}/.config/claude"; CLAUDE_CONFIG_DIR = "${config.home.homeDirectory}/.config/claude";
# Points to the Homebrew location mentioned in your caveat # Points to the Homebrew location mentioned in your caveat
@@ -158,4 +182,14 @@ in
disabled = false disabled = false
format = 'S: {{printf "%.0f" .BlockPct}}% ({{.BlockResets}}) | W: {{printf "%.0f" .WeeklyPct}}%' 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"
'';
} }
+10 -1
View File
@@ -17,6 +17,10 @@ in {
home.sessionVariables.CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude"; home.sessionVariables.CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude";
xdg.enable = true; 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."ssh.conf".source = ./config.ssh.conf;
xdg.configFile."claude/settings.json".source = ./config.claude.json; xdg.configFile."claude/settings.json".source = ./config.claude.json;
xdg.configFile."1Password/ssh/agent.toml".text = '' xdg.configFile."1Password/ssh/agent.toml".text = ''
@@ -102,8 +106,13 @@ in {
user.name = userConfig.gitName; user.name = userConfig.gitName;
user.email = userConfig.gitEmail; user.email = userConfig.gitEmail;
init.defaultBranch = "main"; init.defaultBranch = "main";
pull.rebase = false; push.autoSetupRemote = true;
pull.rebase = true;
core.sshCommand = "ssh"; core.sshCommand = "ssh";
core.fsmonitor = true;
core.untrackedCache = true;
feature.manyFiles = true;
index.version = 4;
}; };
}; };