feat: installed cline package
This commit is contained in:
parent
2efb17d30c
commit
0e1c8d0d4f
4 changed files with 4188 additions and 0 deletions
|
|
@ -10,6 +10,19 @@
|
|||
|
||||
mcp-nixos = inputs.mcp-nixos.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
|
||||
anyProfileHasInstallTool = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.installTool
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
getInstallToolPackage = lib.findFirst (package: package != null) pkgs.cline (map (
|
||||
profile:
|
||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.installTool
|
||||
then profile.extraExtensions.claudeDev.package
|
||||
else null
|
||||
) (lib.attrValues config.programs.vscode.profiles));
|
||||
|
||||
anyProfileHasMcpNixos = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
|
|
@ -69,6 +82,17 @@ in {
|
|||
default = ["saoudrizwan" "claude-dev"];
|
||||
};
|
||||
|
||||
installTool = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to install the cline CLI tool for subagent support when the extension is enabled";
|
||||
};
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.cline;
|
||||
description = "The package to install for the cline CLI tool";
|
||||
};
|
||||
|
||||
mcp = {
|
||||
nixos = {
|
||||
enable = lib.mkEnableOption "enable NixOS MCP server for Claude Dev";
|
||||
|
|
@ -145,6 +169,12 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf anyProfileHasInstallTool {
|
||||
home.packages = [
|
||||
getInstallToolPackage
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf anyProfileHasMcpNixos {
|
||||
home.packages = [
|
||||
mcp-nixos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue