Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,017 changes: 820 additions & 197 deletions flake.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
extra-experimental-features = "nix-command flakes";

extra-substituters = [
"https://cache.nixos.org"
"https://cache.lix.systems"
"https://cache.e10.camp/tilde"
"https://tilde.cachix.org"
"https://nix-community.cachix.org"
"https://numtide.cachix.org"
];

extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
"tilde:Urwh7kyCsSsNmV1gu4sMYFVZCI0ZPwEXjxxtNH06G8U="
"tilde.cachix.org-1:vjup2ixrsWKk+v8FXCqusKWBRwU0l7EzumjnMV4n2Vg="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
Expand Down Expand Up @@ -48,9 +52,6 @@
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";

mcp-servers.url = "github:natsukium/mcp-servers-nix";
mcp-servers.inputs.nixpkgs.follows = "nixpkgs";

pragmatapro.url = "git+ssh://git@github.com/ethnt/pragmatapro";
pragmatapro.inputs.nixpkgs.follows = "nixpkgs";
pragmatapro.inputs.flake-parts.follows = "flake-parts";
Expand Down
6 changes: 2 additions & 4 deletions lib/src/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ let

l = inputs.nixpkgs.lib // builtins;

sharedModules = l.attrValues flake.homeModules ++ (with inputs; [
sops-nix.homeManagerModules.sops
mcp-servers.homeManagerModules.default
]);
sharedModules = l.attrValues flake.homeModules
++ (with inputs; [ sops-nix.homeManagerModules.sops ]);

extraSpecialArgs = {
inherit flake inputs secrets;
Expand Down
6 changes: 6 additions & 0 deletions modules/profiles/home/mcp/context7.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ lib, pkgs, ... }: {
programs.mcp.servers.context7 = {
command = lib.getExe pkgs.context7-mcp;
args = [ ];
};
}
15 changes: 11 additions & 4 deletions modules/profiles/home/mcp/github/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ config, ... }: {
{ config, pkgs, ... }:

let
github-mcp-wrapper = pkgs.writeShellScript "github-mcp-wrapper" ''
export GITHUB_PERSONAL_ACCESS_TOKEN="$(cat ${config.sops.secrets.github_mcp_pat.path})"
exec ${pkgs.github-mcp-server}/bin/github-mcp-server stdio
'';
in {
sops = {
secrets.github_mcp_pat = {
sopsFile = ./secrets.json;
Expand All @@ -13,8 +20,8 @@
};
};

mcp-servers.programs.github = {
enable = true;
envFile = config.sops.templates.github_mcp_env_file.path;
programs.mcp.servers.github = {
command = github-mcp-wrapper;
args = [ ];
};
}
14 changes: 14 additions & 0 deletions modules/profiles/home/mcp/memory.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
let memoryDir = "${config.xdg.dataHome}/mcp-memory";
in {
programs.mcp.servers.memory = {
command = lib.getExe pkgs.mcp-server-memory;
args = [ ];
env = { MEMORY_FILE_PATH = "${memoryDir}/memory.jsonl"; };
};

home.activation.createMcpMemoryDir =
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run mkdir -p "${memoryDir}"
'';
}
7 changes: 6 additions & 1 deletion modules/profiles/home/mcp/nixos.nix
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{ mcp-servers.programs.nixos.enable = true; }
{ lib, pkgs, ... }: {
programs.mcp.servers.nixos = {
command = lib.getExe pkgs.mcp-nixos;
args = [ ];
};
}
3 changes: 3 additions & 0 deletions modules/suites/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ with profiles;
git.mergiraf
git.worktrunk
gh
gh-dash
mcp.context7
mcp.default
mcp.github.default
mcp.memory
mcp.nixos
mise
vscode
Expand Down
1 change: 1 addition & 0 deletions users/et/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
++ (with profiles; [ haskell nodejs ]) ++ [ secrets.users.et.home ] ++ [
./profiles/git.nix
./profiles/jujutsu.nix
./profiles/mcp.nix
./profiles/tmuxp.nix
./profiles/tools.nix
./profiles/vscode.nix
Expand Down
7 changes: 6 additions & 1 deletion users/et/profiles/mcp.nix
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{ mcp-servers.programs.notion.enable = true; }
{
programs.mcp.servers = {
notion.url = "https://mcp.notion.com/mcp";
linear.url = "https://mcp.linear.app/mcp";
};
}
Loading