mirror of
https://github.com/thegeneralist01/config.git
synced 2026-05-30 08:37:01 +02:00
use zsh as login shell on Linux, exec nu for interactive SSH
Set thegeneralist-central's user shell to zsh (matching macOS pattern). Drop the isDarwin guard on .zshrc generation so all hosts get the SSH_TTY-gated nu exec — non-interactive SSH (Codex etc.) stays in zsh, real interactive sessions still land in nu. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b68229b94a
commit
c72bd220d3
2 changed files with 5 additions and 6 deletions
|
|
@ -52,7 +52,7 @@
|
|||
"scanner"
|
||||
"docker"
|
||||
];
|
||||
shell = pkgs.nushell;
|
||||
shell = pkgs.zsh;
|
||||
home = "/home/thegeneralist";
|
||||
homeMode = "0750";
|
||||
linger = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ let
|
|||
flatten
|
||||
getAttr
|
||||
mapAttrsToList
|
||||
mkIf
|
||||
mkOption
|
||||
sortOn
|
||||
toInt
|
||||
|
|
@ -64,7 +63,7 @@ in
|
|||
}
|
||||
)
|
||||
|
||||
(mkIf config.isDarwin (
|
||||
(
|
||||
homeArgs:
|
||||
let
|
||||
config' = homeArgs.config;
|
||||
|
|
@ -72,15 +71,15 @@ in
|
|||
{
|
||||
home.file.".zshrc".text = # zsh
|
||||
''
|
||||
export PATH="/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}"
|
||||
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" ]; then
|
||||
if [ -z "$INTELLIJ_ENVIRONMENT_READER" ] && [ -z "$skip" ] && [ -n "$SSH_TTY" ]; then
|
||||
SHELL='${lib.getExe <| lib.head config'.shellsByPriority}' exec "$SHELL"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
))
|
||||
)
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue