Add a home-manager module that symlinks config/claude/commands and config/claude/skills into ~/.claude, mirroring the opencode module. Seed the commands directory with a /commit slash command.
27 lines
517 B
Nix
27 lines
517 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkIf;
|
|
inherit (lib.metacfg) mkBoolOpt;
|
|
|
|
cfg = config.metacfg.cli-apps.claude-code;
|
|
in
|
|
{
|
|
options.metacfg.cli-apps.claude-code = {
|
|
enable = mkBoolOpt true "Enable claude-code config.";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.file.".claude/commands" = {
|
|
source = ../../../../config/claude/commands;
|
|
recursive = true;
|
|
};
|
|
home.file.".claude/skills" = {
|
|
source = ../../../../config/claude/skills;
|
|
recursive = true;
|
|
};
|
|
};
|
|
}
|