mirror of
https://github.com/thegeneralist01/config.git
synced 2026-05-30 08:37:01 +02:00
fix macOS local terminals not exec-ing nu
The SSH_TTY guard was too broad — it broke local terminal sessions on macOS. Use platform-specific conditions: Darwin omits the SSH_TTY check (always exec nu unless IDE/skip), Linux keeps it (only exec nu for interactive SSH, leaving non-interactive sessions like Codex in zsh). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c72bd220d3
commit
44b56d6fcf
1 changed files with 6 additions and 1 deletions
|
|
@ -67,6 +67,11 @@ in
|
|||
homeArgs:
|
||||
let
|
||||
config' = homeArgs.config;
|
||||
nuExecCondition =
|
||||
if config.isDarwin then
|
||||
''[ -z "$INTELLIJ_ENVIRONMENT_READER" ] && [ -z "$skip" ]''
|
||||
else
|
||||
''[ -z "$INTELLIJ_ENVIRONMENT_READER" ] && [ -z "$skip" ] && [ -n "$SSH_TTY" ]'';
|
||||
in
|
||||
{
|
||||
home.file.".zshrc".text = # zsh
|
||||
|
|
@ -74,7 +79,7 @@ in
|
|||
export PATH="$HOME/.local/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/etc/profiles/per-user/$USER/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin''${PATH:+:}''${PATH}"
|
||||
source ${config'.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh
|
||||
|
||||
if [ -z "$INTELLIJ_ENVIRONMENT_READER" ] && [ -z "$skip" ] && [ -n "$SSH_TTY" ]; then
|
||||
if ${nuExecCondition}; then
|
||||
SHELL='${lib.getExe <| lib.head config'.shellsByPriority}' exec "$SHELL"
|
||||
fi
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue