nixos-config/user/fish.nix

61 lines
1.8 KiB
Nix
Raw Normal View History

2022-08-23 23:42:36 -03:00
{ config, pkgs, lib, ... }:
let inherit (import ./variables.nix) key theme color accent font;
in {
config = {
programs.fish = {
enable = true;
interactiveShellInit = ''
set -g __accent_color "${accent.color}"
alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'"
fzf_key_bindings
set_color red
if not test -d "$HOME/.password-store/"
echo "Password Store not yet setup"
end
if not test -f "$HOME/.ssh/id_rsa"
echo "SSH keys not yet setup"
end
if not rustc --version &> /dev/null
rustup default stable &>/dev/null &
end
'';
2022-08-30 22:01:06 -03:00
shellAliases = { rm = "trash"; };
2022-08-23 23:42:36 -03:00
shellAbbrs = {
v = "kak";
ns = "nix develop --command $SHELL";
# system
sv = "sudo systemct";
suv = "sudo systemct --user";
2022-08-25 12:37:53 -03:00
# docker abbrs
d = "docker";
dc = "docker-compose";
2022-08-23 23:42:36 -03:00
# git abbrs
g = "git";
ga = "git add";
gs = "git status";
gsh = "git show";
gl = "git log";
gg = "git graph";
gd = "git diff";
gds = "git diff --staged";
gc = "git commit";
gca = "git commit --all";
gcf = "git commit --fixup";
gp = "git push -u origin (git branch --show-current)";
gw = "git switch";
gr = "cd (git root)";
gri = "git rebase --interactive FETCH_HEAD";
};
functions = { fish_greeting = ""; };
};
programs.zoxide.enable = true;
programs.direnv.enable = true;
programs.fzf.enable = true;
home.file = {
".config/fish/conf.d/prompt.fish".source = ./fish_prompt.fish;
};
programs.command-not-found.enable = true;
2022-08-30 22:01:06 -03:00
home.packages = with pkgs; [ trash-cli ];
2022-08-23 23:42:36 -03:00
};
}