nix-config-v2/home/shell.nix

73 lines
2.0 KiB
Nix
Raw Permalink Normal View History

2024-09-03 21:24:20 -05:00
{pkgs, ...}: {
2024-07-29 23:09:42 -05:00
programs.fish = {
enable = true;
# initExtra = ''
# export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
# '';
shellAliases = {
# ls aliases
2024-09-03 21:24:20 -05:00
ls = "eza --color";
la = "eza -l -all --color";
ll = "eza -l --color";
lt = "eza -l --color --git";
2024-07-29 23:09:42 -05:00
# lazygit alias
lg = "lazygit";
# cat, less, more alias
2024-09-03 21:24:20 -05:00
cat = "bat";
less = "bat";
more = "bat";
2024-08-15 21:38:53 -05:00
# top alias
top = "btm";
htop = "btm";
2024-07-29 23:09:42 -05:00
};
functions = {
fish_greeting = {
body = ''
2024-09-03 21:24:20 -05:00
set memes \
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
"Daddy, chill!" \
"What the hell is even that?!" \
"Road work ahead? Yeah, I sure hope it does!" \
"Look at all those chickens!" \
"I smell like beef" \
"Say, Coloardo - I'M A GIRAFFE" \
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
"This is the dollar store, how good can it be?" \
"That was legitness" \
"Deez nuts" \
"I wanna be a cowboy baby" \
"Can I get a waffle? Can I please get a waffle?" \
"I'm lesbian. I thought you were American." \
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
"We don't do that here..."
2024-07-29 23:09:42 -05:00
2024-09-03 21:24:20 -05:00
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
2024-07-29 23:09:42 -05:00
2024-09-03 21:24:20 -05:00
printf (set_color F90)"%s\n" $choose_meme
2024-07-29 23:09:42 -05:00
'';
onEvent = "fish_greeting";
};
};
};
programs.zsh = {
enable = true;
initExtra = ''
if [[ -z "$BASH_EXECUTION_STRING" ]]; then
if [[ -n "$ZSH_VERSION" ]]; then
LOGIN_OPTION="--login"
else
LOGIN_OPTION=""
fi
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
}