34 lines
804 B
Nix
34 lines
804 B
Nix
{pkgs, ...}: {
|
|
programs.fish = {
|
|
enable = true;
|
|
interactiveShellInit = ''
|
|
set fish_greeting # Disable greeting
|
|
fish_vi_key_bindings # Enable Vi mode
|
|
'';
|
|
shellAbbrs = {
|
|
cd = "z";
|
|
ngc = "sudo nix-collect-garbage -d";
|
|
};
|
|
plugins = [
|
|
{
|
|
name = "fzf";
|
|
inherit (pkgs.fishPlugins.fzf) src;
|
|
}
|
|
{
|
|
name = "autopair";
|
|
inherit (pkgs.fishPlugins.autopair) src;
|
|
}
|
|
];
|
|
};
|
|
|
|
programs.bash = {
|
|
enable = true;
|
|
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
|
|
'';
|
|
};
|
|
}
|