diff --git a/flake.nix b/flake.nix index a69919e..f087d7e 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ # Set up formatter. formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; - # System Modules + # Global all-hosts configuration nixosModules.default = { ... }: { imports = [ ./system/default/editor.nix @@ -20,6 +20,7 @@ ]; }; + # Linux specific system configuration nixosModules.linux = { ... }: { imports = [ ./system/linux/i18n.nix @@ -29,6 +30,7 @@ ]; }; + # MacOS specific system configuration nixosModules.macos = { ... }: { imports = [ ./system/macos/environment.nix @@ -40,6 +42,7 @@ ]; }; + # Tools on all development machines nixosModules.develop = { ... }: { imports = [ ./system/develop/packages.nix @@ -56,22 +59,32 @@ ]; }; + # Add private homelab and cloud host aliases homeManagerModules.private = { ... }: { imports = [ ./home/private/ssh-hosts.nix ]; }; + # MacOS specific home configuration homeManagerModules.macos = { ... }: { imports = [ ./home/macos/home.nix ]; }; + # Emacs Configuration homeManagerModules.develop = { ... }: { imports = [ ./home/develop/emacs.nix ]; }; + + # Claude Code configuration + homeManagerModules.claude = { ... }: { + imports = [ + ./home/claude/config.nix + ]; + }; }; } diff --git a/home/claude/config.nix b/home/claude/config.nix new file mode 100644 index 0000000..caf7265 --- /dev/null +++ b/home/claude/config.nix @@ -0,0 +1,11 @@ +{ lib, ... }: +{ + # Copy Claude Code configuration files to ~/.claude/ + # Using activation script instead of home.file to copy (not symlink) files + home.activation.copyClaudeCommands = lib.hm.dag.entryAfter ["writeBoundary"] '' + $DRY_RUN_CMD mkdir -p $VERBOSE_ARG $HOME/.claude/commands + $DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/commit.md} $HOME/.claude/commands/commit.md + $DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/go-plan.md} $HOME/.claude/commands/go-plan.md + $DRY_RUN_CMD chmod $VERBOSE_ARG 644 $HOME/.claude/commands/*.md + ''; +} diff --git a/home/claude/config/commands/commit.md b/home/claude/config/commands/commit.md new file mode 100644 index 0000000..c3e77b9 --- /dev/null +++ b/home/claude/config/commands/commit.md @@ -0,0 +1 @@ +Make another git commit -- read the git diff of staged files and write a good long description \ No newline at end of file diff --git a/home/claude/config/commands/go-plan.md b/home/claude/config/commands/go-plan.md new file mode 100644 index 0000000..e060781 --- /dev/null +++ b/home/claude/config/commands/go-plan.md @@ -0,0 +1 @@ +Write the detailed plan to PLAN.md and start. \ No newline at end of file