feat(hm): run fish if bash is started interactively
All checks were successful
/ check (push) Successful in 13s
/ check-renovaterc (push) Successful in 4s
/ build-packages (push) Successful in 14s
/ build-vm (push) Successful in 2s
/ report-size (push) Successful in 4s

Setting `fish` as the login shell causes issues, this is safer to do.
This commit is contained in:
Jalil David Salamé Messina 2025-05-13 19:13:24 +02:00
parent 3ad83d4fd7
commit c50d16b93f
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -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;