nix-config/home/shell/fish/default.nix
2025-03-25 01:26:22 +01:00

32 lines
740 B
Nix

{ pkgs, ...}:
{
# Fix underlying System POSIX bugs
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 ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
programs.fish = {
enable = true;
shellAbbrs = {
ls = "eza";
la = "eza -la";
};
interactiveShellInit = ''
fish_config prompt choose disco
function fish_greeting
fastfetch
echo (set_color yellow)(date +%T)(set_color normal) on $hostname
end
'';
};
}