refactor: removed eslint mcp server
This commit is contained in:
parent
58fec3f132
commit
487dc21550
2 changed files with 6 additions and 33 deletions
|
@ -72,7 +72,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
mcp = {
|
mcp = {
|
||||||
nixos.enable = true;
|
nixos.enable = true;
|
||||||
eslint.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,21 +10,11 @@
|
||||||
|
|
||||||
mcp-nixos = inputs.mcp-nixos.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
mcp-nixos = inputs.mcp-nixos.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
|
||||||
mcp-eslint = pkgs.writeShellScriptBin "mcp-eslint" ''
|
|
||||||
${pkgs.nodejs}/bin/npx --yes @modelcontextprotocol/server-eslint "$@"
|
|
||||||
'';
|
|
||||||
|
|
||||||
anyProfileHasMcpNixos = lib.any (
|
anyProfileHasMcpNixos = lib.any (
|
||||||
profile:
|
profile:
|
||||||
profile.extraExtensions.claudeDev.enable
|
profile.extraExtensions.claudeDev.enable
|
||||||
&& profile.extraExtensions.claudeDev.mcp.nixos.enable
|
&& profile.extraExtensions.claudeDev.mcp.nixos.enable
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
) (lib.attrValues config.programs.vscode.profiles);
|
||||||
|
|
||||||
anyProfileHasMcpEslint = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.mcp.eslint.enable
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
in {
|
in {
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
options.programs.vscode.profiles = lib.mkOption {
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
||||||
|
@ -39,9 +29,6 @@ in {
|
||||||
nixos = {
|
nixos = {
|
||||||
enable = lib.mkEnableOption "enable NixOS MCP server for Claude Dev";
|
enable = lib.mkEnableOption "enable NixOS MCP server for Claude Dev";
|
||||||
};
|
};
|
||||||
eslint = {
|
|
||||||
enable = lib.mkEnableOption "enable ESLint MCP server for Claude Dev";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -60,27 +47,14 @@ in {
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(lib.mkIf anyProfileHasMcpEslint {
|
(lib.mkIf anyProfileHasMcpNixos {
|
||||||
home.packages = [
|
|
||||||
mcp-eslint
|
|
||||||
pkgs.eslint
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.mkIf (anyProfileHasMcpNixos || anyProfileHasMcpEslint) {
|
|
||||||
home.file."${config.xdg.configHome}/VSCodium/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json" = {
|
home.file."${config.xdg.configHome}/VSCodium/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json" = {
|
||||||
text = builtins.toJSON {
|
text = builtins.toJSON {
|
||||||
mcpServers =
|
mcpServers = {
|
||||||
(lib.optionalAttrs anyProfileHasMcpNixos {
|
|
||||||
nixos = {
|
nixos = {
|
||||||
command = "${mcp-nixos}/bin/mcp-nixos";
|
command = "${mcp-nixos}/bin/mcp-nixos";
|
||||||
};
|
};
|
||||||
})
|
|
||||||
// (lib.optionalAttrs anyProfileHasMcpEslint {
|
|
||||||
eslint = {
|
|
||||||
command = "${mcp-eslint}/bin/mcp-eslint";
|
|
||||||
};
|
};
|
||||||
});
|
|
||||||
};
|
};
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue