mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-05 23:24:57 +08:00
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ flake, pkgs, lib, ... }:
|
|
let
|
|
subagentsDir = ./subagents;
|
|
agents = lib.flip lib.mapAttrs' (lib.filterAttrs (fileName: fileType: fileType == "regular" && lib.hasSuffix ".md" fileName) (builtins.readDir subagentsDir))
|
|
(fileName: _: lib.nameValuePair (lib.removeSuffix ".md" fileName) (builtins.readFile (subagentsDir + "/${fileName}")));
|
|
in
|
|
{
|
|
programs.claude-code = {
|
|
enable = true;
|
|
|
|
# Wrapped Claude Code with Google Vertex AI auth
|
|
# See https://github.com/juspay/vertex
|
|
package = flake.inputs.vertex.packages.${pkgs.system}.default;
|
|
|
|
# Basic settings for Claude Code
|
|
settings = {
|
|
enableAllProjectMcpServers = true;
|
|
permissions = {
|
|
defaultMode = "plan";
|
|
allow = [
|
|
"Bash(nix develop:*)"
|
|
"Bash(nix build:*)"
|
|
"Bash(om ci)"
|
|
"Bash(rg:*)"
|
|
];
|
|
};
|
|
};
|
|
|
|
# Custom commands can be added here
|
|
commands = {
|
|
"om-ci" = ''
|
|
#!/bin/bash
|
|
# Run local CI (Nix)
|
|
om ci
|
|
'';
|
|
};
|
|
|
|
# Automatically discovered agents from subagents/ directory
|
|
agents = agents;
|
|
|
|
# MCP servers configuration
|
|
mcpServers = {
|
|
"nixos-mcp" = {
|
|
command = "uvx";
|
|
args = [ "mcp-nixos" ];
|
|
};
|
|
};
|
|
};
|
|
}
|