Files
nixos-blueprint/modules/home/programs/shell/fish.nix
2025-04-08 16:39:34 +03:00

55 lines
1.3 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 = {
eza.enable = true;
zoxide.enable = true; # fuzzy cd in rust
direnv.enable = true;
direnv.silent = true;
nix-your-shell.enable = true;
keychain = {
enable = true;
# extraFlags = ["--quiet" "--noask"];
keys = ["id_ed25519"];
};
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
'';
};
};
};
}