From c50d16b93fa6155f3ca3c7037d4e3145e2107b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Tue, 13 May 2025 19:13:24 +0200 Subject: [PATCH] feat(hm): run fish if bash is started interactively Setting `fish` as the login shell causes issues, this is safer to do. --- modules/hm/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/hm/default.nix b/modules/hm/default.nix index c73fc13..8073d38 100644 --- a/modules/hm/default.nix +++ b/modules/hm/default.nix @@ -50,6 +50,14 @@ in }; programs = { + # Switch to fish if bash is started interactively + bash.initExtra = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; # Better cat (bat) bat = { enable = true;