1
Fork 0
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:
TheGeneralist 2026-03-16 15:14:15 +01:00
parent b68229b94a
commit c72bd220d3
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 5 additions and 6 deletions

View file

@ -52,7 +52,7 @@
"scanner" "scanner"
"docker" "docker"
]; ];
shell = pkgs.nushell; shell = pkgs.zsh;
home = "/home/thegeneralist"; home = "/home/thegeneralist";
homeMode = "0750"; homeMode = "0750";
linger = true; linger = true;

View file

@ -11,7 +11,6 @@ let
flatten flatten
getAttr getAttr
mapAttrsToList mapAttrsToList
mkIf
mkOption mkOption
sortOn sortOn
toInt toInt
@ -64,7 +63,7 @@ in
} }
) )
(mkIf config.isDarwin ( (
homeArgs: homeArgs:
let let
config' = homeArgs.config; config' = homeArgs.config;
@ -72,15 +71,15 @@ in
{ {
home.file.".zshrc".text = # zsh 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 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" SHELL='${lib.getExe <| lib.head config'.shellsByPriority}' exec "$SHELL"
fi fi
''; '';
} }
)) )
]; ];
} }