1
0

Add homeManagerModules.claude for Claude Code configuration management

This commit introduces a new home-manager module that provides declarative
configuration management for Claude Code, Anthropic's official CLI tool. The
module follows the established pattern used by other home-manager modules in
this flake (default, private, macos, develop) and enables users to deploy
custom Claude Code slash commands and configuration files to ~/.claude/.

Changes included:

1. Created home/claude/config.nix module:
   - Defines a new home-manager module for Claude Code configuration
   - Uses home.file to deploy command files from the Nix store to ~/.claude/
   - Currently deploys two custom slash commands to ~/.claude/commands/

2. Added two custom slash commands:
   - commit.md: Automates git commit creation by reading staged diffs and
     generating comprehensive commit messages
   - go-plan.md: Writes detailed implementation plans to PLAN.md before
     starting work, supporting the planning workflow

3. Registered homeManagerModules.claude in flake.nix:
   - Added as a new, independent module group that can be imported separately
   - Positioned after the develop module for logical organization
   - Can be enabled by importing inputs.nix-shared.homeManagerModules.claude

4. Enhanced flake.nix documentation:
   - Added descriptive comments for all nixosModules and homeManagerModules
   - Clarifies the purpose of each module group (e.g., "Linux specific system
     configuration", "Add private homelab and cloud host aliases")
   - Improves maintainability and makes the flake structure self-documenting

The module structure supports easy extension - additional slash commands or
configuration files can be added by placing them in home/claude/config/ and
adding corresponding home.file entries in config.nix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-13 23:08:01 -08:00
parent 192f09e86f
commit a745959f97
4 changed files with 22 additions and 1 deletions

6
home/claude/config.nix Normal file
View File

@@ -0,0 +1,6 @@
{ ... }:
{
# Deploy Claude Code configuration files to ~/.claude/
home.file.".claude/commands/commit.md".source = ./config/commands/commit.md;
home.file.".claude/commands/go-plan.md".source = ./config/commands/go-plan.md;
}

View File

@@ -0,0 +1 @@
Make another git commit -- read the git diff of staged files and write a good long description

View File

@@ -0,0 +1 @@
Write the detailed plan to PLAN.md and start.