2.8 KiB
2.8 KiB
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:
# 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
# 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:
home-manager build --flake .#tbingmann
Debugging Issues
For more detailed information when troubleshooting:
home-manager switch --flake .#tbingmann --debug
Configuration Guidelines
When modifying this repository:
- Update packages in the
home.packagessection ofhome.nix - Customize Bash settings in the
programs.bashsection - Add or modify program configurations under the
programsattribute - Adjust Nix configuration in the
nixsection if needed - Ensure the username (
tbingmann) is consistent throughout the configuration
Nix Configuration Details
The configuration includes:
- Installation of Nix packages: The
nixpackage itself,nixpkgs-fmt, andnix-direnv - Nix experimental features: Enables both
nix-commandandflakesby default - PATH configuration: Sets up proper Nix paths in the Bash environment
- direnv integration: Configured to work with Nix for project-specific environments
- SSH support: Configured to ensure Nix tools are available in both interactive and non-interactive SSH sessions