From c72bd220d36f7905206beca359b9829e0ea8a14a Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:14:15 +0100 Subject: [PATCH] use zsh as login shell on Linux, exec nu for interactive SSH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hosts/thegeneralist-central/configuration.nix | 2 +- modules/common/shell/default.nix | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index 4bec0ca..2360cc0 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -52,7 +52,7 @@ "scanner" "docker" ]; - shell = pkgs.nushell; + shell = pkgs.zsh; home = "/home/thegeneralist"; homeMode = "0750"; linger = true; diff --git a/modules/common/shell/default.nix b/modules/common/shell/default.nix index d3c37f7..bc4b6d2 100644 --- a/modules/common/shell/default.nix +++ b/modules/common/shell/default.nix @@ -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 ''; } - )) + ) ]; }