Files
mcp-servers/flake.nix
T
2026-10-22 17:12:12 +02:00

86 lines
2.1 KiB
Nix

{
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
description = "MCP Server Packages for Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
mcpGatewayModule = import ./modules/mcp-gateway.nix;
sshMcpModule = import ./modules/ssh-mcp.nix;
in
{
overlays.default = import ./overlays/default.nix;
homeManagerModules = {
mcp-gateway = mcpGatewayModule;
ssh-mcp = sshMcpModule;
default = {
imports = [
mcpGatewayModule
sshMcpModule
];
};
};
}
// {
packages = forAllSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
mcpPackages = import ./packages { inherit pkgs; };
in
mcpPackages // {
default = pkgs.symlinkJoin {
name = "mcp-servers";
paths = builtins.attrValues mcpPackages;
};
}
);
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
mcpPackages = import ./packages { inherit pkgs; };
in
{
default = pkgs.mkShell {
packages = builtins.attrValues mcpPackages ++ [ pkgs.mcp-nixos pkgs.git ];
shellHook = ''
export SEARXNG_BASE_URL="https://search.bueso.eu"
export SEARXNG_URL="https://search.bueso.eu"
'';
};
}
);
checks.x86_64-linux = builtins.removeAttrs self.packages.x86_64-linux [ "default" ];
};
}