1
0
Files
nix-ebay-home/home.nix
Timo Bingmann 1e30095098 fix paths
2025-07-09 14:37:05 -07:00

83 lines
2.2 KiB
Nix

{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should manage
home.username = "tbingmann";
home.homeDirectory = "/home/tbingmann";
# Basic configuration
home.stateVersion = "25.05";
# Let Home Manager install and manage itself
programs.home-manager.enable = true;
# Configure PATH for all shells, including non-interactive ones
home.sessionPath = [
"${config.home.homeDirectory}/.nix-profile/bin"
"/nix/var/nix/profiles/default/bin"
];
# Nix configuration
nix = {
enable = true;
package = pkgs.nix;
settings = {
experimental-features = ["nix-command" "flakes"];
warn-dirty = false;
};
};
# Set environment variables for all shells
home.sessionVariables = {
NIX_PATH = "${config.home.homeDirectory}/.nix-defexpr/channels:nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs";
# Pre-set NIX_SOURCED to avoid duplicate sourcing
NIX_SOURCED = "1";
};
# Packages to install
home.packages = with pkgs; [
eza
];
# Bash configuration
programs.bash = {
enable = true;
enableCompletion = true;
# Bash initialization
initExtra = ''
# Ensure Nix paths are properly set up
export PATH="$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"
export NIX_PATH="$HOME/.nix-defexpr/channels:nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs"
# Source nix environment if it exists and not already sourced
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && [ -z "$NIX_SOURCED" ]; then
export NIX_SOURCED=1
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
fi
'';
shellAliases = {
"hm-up" = "nix run github:nix-community/home-manager/release-25.05 -- switch --no-write-lock-file --refresh --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann'";
};
# History configuration
historyControl = [
"erasedups"
"ignoredups"
"ignorespace"
];
historyFileSize = 1000000;
historySize = 1000000;
};
# Direnv configuration
programs.direnv = {
enable = true;
nix-direnv.enable = true;
# Add hook to .bashrc
enableBashIntegration = true;
};
}