Add fish configuration

Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
This commit is contained in:
George Kaklamanos 2024-04-28 22:57:28 +03:00
parent 190435b507
commit c082a20751
No known key found for this signature in database
GPG key ID: C0CAB8A6BDC9399D
2 changed files with 55 additions and 1 deletions

View file

@ -1,3 +1,3 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [./starship.nix]; imports = [./fish.nix ./starship.nix];
} }

54
home-manager/fish.nix Normal file
View file

@ -0,0 +1,54 @@
{pkgs, ...}: {
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
'';
plugins = [
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "fzf-fish";
src = pkgs.fishPlugins.fzf-fish.src;
}
];
shellAliases = {
# My defaults
"ls" = "exa";
"dig" = "dig +noall +answer";
"ffmpeg" = "ffmpeg -hide_banner -loglevel error -stats -threads 10";
"rsync" = "rsync --info=progress2 --progress -rpgo --partial --inplace";
# Nix
"nrs" = "sudo nixos-rebuild switch --flake ~gkaklas/nix/nixos/";
"upn" = "sudo nix flake update ~gkaklas/nix/nixos/";
"hms" = "home-manager switch --flake ~/nix/home-manager/";
"uph" = "nix flake update ~/nix/home-manager/ ";
# git
"gc" = "git commit --verbose --gpg-sign --signoff";
"gc!" = "git commit --verbose --gpg-sign --signoff --amend";
"gst" = "git status";
"gdca" = "git diff --cached";
"gapa" = "git add --patched";
"glola" = "git log --graph --pretty=\"%G?-%C(magenta)%h %C(yellow)(%al)%C(cyan): %s\" --color=always";
};
shellAbbrs = {
"-h" = {
position = "anywhere";
expansion = "--help";
};
"L" = {
position = "anywhere";
setCursor = true;
expansion = "% | less";
};
};
};
}