cleo-darwin: local env updates
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{ config, inputs, pkgs, ... }: {
|
{ config, inputs, lib, pkgs, ... }: {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
@@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user