# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Repository Purpose This repository contains a Nix home-manager flake configuration for setting up a user environment on a Linux system. It's designed for user `tbingmann` and includes configurations for Nix itself, Bash, direnv, Git, and other utilities. The configuration ensures Nix is properly installed and configured with experimental features enabled. ## Code Architecture - **flake.nix**: The main Nix flake configuration file that defines inputs (dependencies) and outputs. It sets up the home-manager configuration for user `tbingmann`. - **home.nix**: Contains the actual home-manager configuration including: - User information - Nix installation and configuration with flakes support - Package installations - Bash configuration and customizations with Nix PATH setup - Direnv setup - Git configuration ## Common Commands ### Applying Configuration Changes After making changes to the configuration: ```bash # If home-manager is not installed nix run github:nix-community/home-manager/release-25.05 -- switch --flake .#tbingmann # If home-manager is installed home-manager switch --flake .#tbingmann ``` ### Direct Installation from Git Repository ```bash # If home-manager is not installed nix --no-write-lock-file run github:nix-community/home-manager/release-25.05 -- switch --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann' # If home-manager is installed home-manager --no-write-lock-file switch --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann' ``` ### Checking Configuration Validity To validate configuration changes without applying them: ```bash home-manager build --flake .#tbingmann ``` ### Debugging Issues For more detailed information when troubleshooting: ```bash home-manager switch --flake .#tbingmann --debug ``` ## Configuration Guidelines When modifying this repository: 1. Update packages in the `home.packages` section of `home.nix` 2. Customize Bash settings in the `programs.bash` section 3. Add or modify program configurations under the `programs` attribute 4. Adjust Nix configuration in the `nix` section if needed 5. Ensure the username (`tbingmann`) is consistent throughout the configuration ## Nix Configuration Details The configuration includes: 1. **Installation of Nix packages**: The `nix` package itself, `nixpkgs-fmt`, and `nix-direnv` 2. **Nix experimental features**: Enables both `nix-command` and `flakes` by default 3. **PATH configuration**: Sets up proper Nix paths in the Bash environment 4. **direnv integration**: Configured to work with Nix for project-specific environments