nixfiles/home-manager/common.nix
2021-03-29 15:22:47 -07:00

75 lines
1.9 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./modules ];
programs.vim = {
enable = true;
extraConfig = ''
set nocompatible
set nocp
set backspace=indent,eol,start
'';
};
home.sessionVariables = { TERM = "xterm-256color"; };
programs.bat.enable = true;
programs.fish =
let
bobthefish = builtins.fetchGit {
url = "https://github.com/oh-my-fish/theme-bobthefish.git";
rev = "a2ad38aa051aaed25ae3bd6129986e7f27d42d7b";
};
in
{
enable = true;
shellAliases = {
cat = "bat";
};
plugins = [
{
name = "done";
src = builtins.fetchGit {
url = "https://github.com/franciscolourenco/done.git";
rev = "9351f5a9f4ae6c73dd6f18e41364e63a77be5d90";
};
}
{
name = "bobthefish";
src = bobthefish;
}
];
interactiveShellInit = ''
set TERM xterm-256color
# Load nix shit on non-NixOS computers (yea yea laugh it up we all have legacy machines somewhere)
if not set -q NIX_PATH
fenv source $HOME/.nix-profile/etc/profile.d/nix.sh
end
set -U __done_min_cmd_duration 2000
set -U __done_notification_command '${pkgs.espeak}/bin/espeak yyyyyi'
source ${bobthefish}/fish_prompt.fish
set -Ua fish_user_paths ~/.bin
set -Ua fish_user_paths ~/.local/bin
set -Ua fish_user_paths ~/.npm-global/bin
set -Ua fish_user_paths ~/.cargo/bin
set -U fish_key_bindings fish_default_key_bindings
set -g theme_nerd_fonts yes
function fish_greeting
begin ${pkgs.figlet}/bin/figlet -f mini heh; echo ""; uptime; uname -a; end | ${pkgs.lolcat}/bin/lolcat
end
eval (${pkgs.direnv}/bin/direnv hook fish)
${pkgs.thefuck}/bin/thefuck --alias | source
'';
};
}