52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
programs.fish = {
|
|
enable = true;
|
|
|
|
shellAliases = {
|
|
ssh = "TERM=xterm-256color command ssh";
|
|
tf = "terraform";
|
|
ll = "ls -alF";
|
|
la = "ls -A";
|
|
gs = "git status";
|
|
gd = "git diff";
|
|
nrs = "sudo nixos-rebuild switch --flake ~/nixos#pc-mans";
|
|
nrt = "sudo nixos-rebuild test --flake ~/nixos#pc-mans";
|
|
nfu = "nix flake update ~/nixos";
|
|
};
|
|
|
|
interactiveShellInit = ''
|
|
set -g fish_greeting ""
|
|
fish_vi_key_bindings
|
|
bind yy fish_clipboard_copy
|
|
bind Y fish_clipboard_copy
|
|
bind p fish_clipboard_paste
|
|
'';
|
|
|
|
functions = {
|
|
fish_prompt = ''
|
|
set -l symbol ' $ '
|
|
set -l color $fish_color_cwd
|
|
if fish_is_root_user
|
|
set symbol ' # '
|
|
set -q fish_color_cwd_root
|
|
and set color $fish_color_cwd_root
|
|
end
|
|
|
|
echo -n $USER@$hostname
|
|
|
|
set_color $color
|
|
echo -n (prompt_pwd)
|
|
set_color normal
|
|
|
|
echo -n $symbol
|
|
'';
|
|
};
|
|
};
|
|
|
|
home.sessionVariables = {
|
|
PAGER = "nvim +Man!";
|
|
};
|
|
}
|