nix-home/home/fish/fish.nix

77 lines
2.2 KiB
Nix
Raw Normal View History

2021-10-26 18:25:19 +00:00
{ config, pkgs, nixpkgs-unstable, ... }:
2021-09-29 23:00:14 +00:00
2021-10-09 02:52:28 +00:00
let
2021-10-26 18:25:19 +00:00
pkgsUnstable = import nixpkgs-unstable { system = pkgs.system; };
2021-10-09 02:52:28 +00:00
in
2021-09-29 23:00:14 +00:00
{
programs.fish = {
enable = true;
2021-10-09 02:52:28 +00:00
package = pkgsUnstable.fish;
2021-09-29 23:00:14 +00:00
functions = {
};
shellAliases = {
cat = "bat --theme=GitHub ";
l = "exa -l --color=always ";
htop = "btm --color nord-light -b --tree";
Htop = "btm --color nord-light --tree";
# My own commands for easy access
thisterm = "cd ~/Projects/uw/$CURRENT_TERM";
today = "date +%F";
};
interactiveShellInit = ''
set fish_greeting
# Set up an editor alias
if test -n "$EDITOR"
alias e="$EDITOR"
else
alias e="kak"
end
# Source iTerm2 integration
2021-10-09 02:55:00 +00:00
test -e ~/.iterm2_shell_integration.fish && source ~/.iterm2_shell_integration.fish
2021-10-09 02:52:28 +00:00
# Enable vi keybindings
fish_vi_key_bindings
## Set some kak-focused keybindings
bind -M default gi beginning-of-line
bind -M default gl end-of-line
2021-09-29 23:00:14 +00:00
'';
plugins = [
{
name = "tide";
src = pkgs.fetchFromGitHub {
owner = "IlanCosman";
repo = "tide";
rev = "3787c725f7f6a0253f59a2c0e9fde03202689c6c";
sha256 = "00zsib1q21bgxffjlyxf5rgcyq3h1ixwznwvid9k6mkkmwixv9lj";
};
}
{
name = "fzf";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "fzf";
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
};
}
];
};
# Source files
home.file = {
"fish/change_cmd.fish" = {
source = ./. + "/change_cmd.fish";
2021-09-29 23:08:16 +00:00
target = ".config/fish/conf.d/change_cmd.fish";
};
"fish/pls.fish" = {
source = ./. + "/pls.fish";
target = ".config/fish/conf.d/pls.fish";
2021-09-29 23:00:14 +00:00
};
};
}