Files
nixos-blueprint/modules/home/programs/shell/fish.nix
2025-04-26 23:21:20 +03:00

51 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption getExe;
cfg = config.shell.fish;
in {
options = {
shell.fish.enable =
mkEnableOption "enable fish";
};
config = mkIf cfg.enable {
programs = {
atuin = {
enable = true;
flags = [
"--disable-up-arrow"
];
};
fish = {
enable = true; # friendly interactive shell in rust
shellAliases = {
cd = "z";
ed = "$EDITOR";
jf = "jj-fzf"; # think of jeff
jo = "joshuto"; # think of josh
l = "ls -lah";
la = "ls -ah";
ll = "ls -lh";
p = "pueue";
s = "systemctl";
};
shellAbbrs = {
pa = "pueue add --";
pl = "pueue log";
};
interactiveShellInit = ''
bind \e\[3\;5~ kill-word
bind \cH backward-kill-word
set fish_greeting
set fish_cursor_default block blink
set EDITOR hx
${getExe pkgs.bat-extras.batman} --export-env | source
'';
};
};
};
}