nixcfg/modules/home/cli-apps/fish/default.nix
Harald Hoyer 267be620cf feat(nix): enhance WezTerm and Fish configuration
- Enabled scroll bar and added conditional fullscreen key handling in `wezterm.lua` for better usability.
- Updated Fish shell to set global `LESS` mouse support for improved navigation.
2026-02-10 15:22:58 +01:00

40 lines
928 B
Nix

{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.metacfg.cli-apps.fish;
in
{
options.metacfg.cli-apps.fish = {
enable = mkEnableOption "FISH shell";
};
config = mkIf cfg.enable {
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
set -gx LESS '--mouse'
function msh --wraps mosh --description 'mosh with tmux'
if not set -q argv[1]
echo 'Usage: msh [user@]host [command]'
else
${pkgs.mosh}/bin/mosh $argv -- tmux new-session -A -s 0
end
end
function tsh --wraps ssh --description 'ssh with tmux'
if not set -q argv[1]
echo 'Usage: tsh [user@]host [command]'
else
${pkgs.openssh}/bin/ssh -t $argv -- tmux new-session -A -s 0
end
end
'';
};
};
}