{ 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}/.local/bin" "${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=${config.home.homeDirectory}/.nix-defexpr/channels/nixpkgs"; # Use bwrap for nix-portable NP_RUNTIME = "bwrap"; }; # Create SSH environment file for non-interactive sessions # This helps with SSH commands that don't source profile files home.file.".ssh/environment".text = '' PATH=${config.home.homeDirectory}/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH NIX_PATH=${config.home.homeDirectory}/.nix-defexpr/channels:nixpkgs=${config.home.homeDirectory}/.nix-defexpr/channels/nixpkgs ''; # Packages to install home.packages = with pkgs; [ nix eza ]; # Bash configuration programs.bash = { enable = true; enableCompletion = true; # This is sourced by both interactive and non-interactive shells # Critical for SSH non-interactive sessions profileExtra = '' # Ensure Nix paths are properly set up for all shells 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 if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/nix.sh" fi ''; # This is only sourced by interactive shells initExtra = '' # Additional interactive shell settings can go here ''; 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; }; }