feat(config): enhance CrateDocs MCP server configuration
Some checks failed
Rust / build (push) Failing after 14s
Some checks failed
Rust / build (push) Failing after 14s
- Changed `ExecStart` to bind the server to `127.0.0.1` and added explicit `http` scheme. - Removed unnecessary trailing whitespace across the file for cleaner formatting.
This commit is contained in:
parent
8440fc1c9a
commit
0de57e61eb
1 changed files with 8 additions and 8 deletions
16
config.nix
16
config.nix
|
@ -5,41 +5,41 @@ in
|
||||||
{
|
{
|
||||||
options.services.cratedocs-mcp = {
|
options.services.cratedocs-mcp = {
|
||||||
enable = lib.mkEnableOption "CrateDocs MCP server";
|
enable = lib.mkEnableOption "CrateDocs MCP server";
|
||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
default = 3000;
|
default = 3000;
|
||||||
description = "Port to listen on for HTTP/SSE server";
|
description = "Port to listen on for HTTP/SSE server";
|
||||||
};
|
};
|
||||||
|
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "cratedocs-mcp";
|
default = "cratedocs-mcp";
|
||||||
description = "User to run the service as";
|
description = "User to run the service as";
|
||||||
};
|
};
|
||||||
|
|
||||||
group = lib.mkOption {
|
group = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "cratedocs-mcp";
|
default = "cratedocs-mcp";
|
||||||
description = "Group to run the service as";
|
description = "Group to run the service as";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.cratedocs-mcp = {
|
systemd.services.cratedocs-mcp = {
|
||||||
description = "CrateDocs MCP server";
|
description = "CrateDocs MCP server";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${lib.getExe pkgs.cratedocs-mcp} --port ${toString cfg.port}";
|
ExecStart = "${lib.getExe pkgs.cratedocs-mcp} http -a 127.0.0.1:${toString cfg.port}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = "cratedocs-mcp";
|
StateDirectory = "cratedocs-mcp";
|
||||||
CacheDirectory = "cratedocs-mcp";
|
CacheDirectory = "cratedocs-mcp";
|
||||||
|
|
||||||
# Security hardening
|
# Security hardening
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
|
@ -64,4 +64,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue