feat: add metrics exporters for Dovecot and Postfix, update Signal execution command, and improve configuration management

This commit is contained in:
2025-06-03 23:06:40 +02:00
parent 436903543b
commit e8bf13275e
10 changed files with 102 additions and 3 deletions

57
shell.nix Normal file
View File

@@ -0,0 +1,57 @@
with import <nixpkgs> { };
let
# 1. Import mcp-servers-nix (classic default.nix) from GitHub.
# This provides `mcpServers.lib.mkConfig` and the individual server packages.
mcpServers = import (builtins.fetchTarball {
url = "https://github.com/natsukium/mcp-servers-nix/archive/refs/heads/main.tar.gz";
# Optionally pin with sha256 once known.
}) { inherit pkgs; };
# 3. Build the JSON configuration string with exactly fetch, memory, and brave-search.
# We assume you store your Brave Search API key in "~/.config/mcp-servers/brave.env"
mcpConfig = mcpServers.lib.mkConfig pkgs {
programs = {
# fetch.enable = true;
filesystem = {
enable = true;
args = [ "/home/${builtins.getEnv "USER"}/projects/cloonar/cloonar-nixos/" ];
};
git = {
enable = true;
args = [ "/home/${builtins.getEnv "USER"}/projects/cloonar/cloonar-nixos/" ];
};
sequential-thinking.enable = true;
# memory.enable = true;
"brave-search" = {
enable = true;
envFile = "/home/${builtins.getEnv "USER"}/.config/mcp-servers/brave.env";
};
};
settings = {
mcpServers = {
nixos = {
command = "nix";
args = ["run" "github:utensils/mcp-nixos" "--"];
};
};
};
};
in
pkgs.mkShell {
# 4. Bring in 'jq' so you can inspect the JSON if needed.
buildInputs = [ pkgs.jq ];
# 5. On shell entry, write out 'claude_desktop_config.json' in the project root.
shellHook = ''
if [ -f ./.roo/mcp.json ]; then
echo "Removing old mcp.json"
rm ./.roo/mcp.json
fi
echo "Generating mcp.json"
ln -s ${builtins.toString mcpConfig} ./.roo/mcp.json
echo " mcp.json has been created."
'';
}