diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index da8f8b4..875044b 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -35,6 +35,11 @@ in ]; programs = { + # Launch fish if shell is interactive (from https://wiki.nixos.org/wiki/Fish) + bash.interactiveShellInit = # bash + '' + 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 + ''; # Default shell fish.enable = true; # Shell prompt