refactor(shell): move bash->nushell wrapper to common
Default login shell is now bash for all hosts; interactive bash
sessions exec into nushell via /etc/bashrc. A ~/.bashrc sourcing
/etc/bashrc covers non-login interactive shells (terminal emulators).
Non-interactive SSH exec (mosh app bootstrap, scripts) keeps POSIX
shell semantics. Reverts the kratos-host-specific overlay from
765ae15.
This commit is contained in:
@@ -76,5 +76,14 @@
|
||||
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
nixPath = ["/etc/nix/path"];
|
||||
};
|
||||
users.defaultUserShell = pkgs.nushell;
|
||||
users.defaultUserShell = pkgs.bashInteractive;
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
if [[ $- == *i* ]] && [[ -z "''${M3_SHELL_TO_NU:-}" ]]; then
|
||||
export M3_SHELL_TO_NU=1
|
||||
exec ${pkgs.nushell}/bin/nu --login
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -236,6 +236,9 @@ in {
|
||||
|
||||
# ── Home-Manager configuration via m3ta-home ──
|
||||
home-manager.users.m3tam3re = {
|
||||
home.file.".bashrc".text = ''
|
||||
. /etc/bashrc
|
||||
'';
|
||||
imports =
|
||||
[
|
||||
# Load m3ta-home composition engine
|
||||
|
||||
Reference in New Issue
Block a user