dotfiles.nix/users/mat-hm.nix

124 lines
2.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{ pkgs, ... }:
let
name = "Matthew Ess";
email = "mat@mat.services";
in {
home = {
sessionVariables = { EDITOR = "nvim"; };
packages = with pkgs; [
# nix utilities
cachix
niv
nixfmt
nix-prefetch-git
fishPlugins.foreign-env
# command line utils
dnsutils
fd
fzy
httpie
jq
neofetch
rlwrap
tealdeer
];
file = import ../hm-configs/files-all.nix;
};
programs = {
bat.enable = true;
broot.enable = true;
command-not-found = {
enable = true;
dbPath = import ../profiles/programs.sqlite.secret.nix;
};
direnv = {
enable = true;
enableNixDirenvIntegration = true;
};
fish = {
enable = true;
interactiveShellInit = ''
echo '(´) welcome (´)'
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fish -c fisher update
end
fish_vi_key_bindings
set VIRTUAL_ENV_DISABLE_PROMPT true
alias cat=bat
alias br=broot
alias tree=br
alias ack=rg
alias ag=rg
alias grep=rg
bind \cr 'fzy_select_history (commandline -b)'
bind -M insert \cr 'fzy_select_history (commandline -b)'
bind \cf 'fzy_select_directory'
bind -M insert \cf 'fzy_select_directory'
bind -M insert ! __history_previous_command
bind -M insert '$' __history_previous_command_arguments
if test -d $HOME/.nix-profile
replay "source $HOME/.nix-profile/etc/profile.d/nix.sh"
replay "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
end
'';
};
git = {
enable = true;
userName = "${name}";
userEmail = "${email}";
ignores = [ ".*.sw[a-z]" "tags" ];
extraConfig = {
color.ui = true;
core.editor = "vim";
push.default = "simple";
init.defaultBranch = "main";
};
};
home-manager = {
enable = true;
};
htop = {
enable = true;
highlightBaseName = true;
};
man.enable = true;
neovim = import ../hm-configs/neovim.nix { inherit pkgs; };
ssh = {
enable = true;
serverAliveInterval = 60;
extraOptionOverrides = { "AddKeysToAgent" = "true"; };
};
starship.enable = true;
tmux = {
enable = true;
keyMode = "vi";
newSession = true;
shortcut = "a";
baseIndex = 1;
terminal = "tmux-256color";
extraConfig = ''
set -g mouse on
setw -g pane-base-index 1
unbind %
bind | split-window -h
bind _ split-window -v
'';
};
};
}