nixos-config/common/home.nix

44 lines
1 KiB
Nix

{ config, pkgs, ... }:
{
home.username = "nimmo";
home.homeDirectory = "/home/nimmo";
home.stateVersion = "24.11";
programs.bash = {
enable = true;
enableCompletion = true;
# History Search (Prefix sensitive)
# Using bashrcExtra ensures it's available in interactive shells
bashrcExtra = ''
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
'';
# Bash-it configuration
initExtra = ''
# Path to the bash-it installation provided by Nix
export BASH_IT="${pkgs.bash-it}/share/bash-it"
# Set the theme
export BASH_IT_THEME="rjorgenson"
# Disable auto-update as Nix manages the package version
export BASH_IT_AUTOMATIC_UPDATE_CHECK=false
# Load Bash-it
if [ -f "$BASH_IT/bash_it.sh" ]; then
source "$BASH_IT/bash_it.sh"
fi
'';
};
# Add bash-it to user packages
home.packages = with pkgs; [
bash-it
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}