{ pkgs, lib, ... }: { # https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell # Login shells stay bash but immediately `exec fish` so fish is the effective shell # without breaking scripts that hardcode #!/bin/bash. programs.fish.enable = true; programs.bash = { interactiveShellInit = '' 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 ${lib.getExe pkgs.fish} $LOGIN_OPTION fi ''; }; }