fix: assert unknown profiles in mkHomeConfig; move agent modules to coding/agents
- home/lib/default.nix: add assertion for unknown profile names instead of
silently filtering them out; remove unused 'inherit (lib) optional'
- home/coding/agents/{opencode,pi}.nix: moved from home/features/coding/
to co-locate with agents.nix (eliminating cross-directory back-references)
- home/coding/agents/agents.nix: update imports to ./opencode.nix and ./pi.nix
- home/features/coding/: remove now-dead default.nix (nothing imported it)
This commit is contained in:
@@ -1,101 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
videoDrivers,
|
||||
...
|
||||
}: let
|
||||
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
|
||||
in {
|
||||
home.file.".npmrc".text = ''
|
||||
prefix=${npmGlobalPrefix}
|
||||
'';
|
||||
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
|
||||
imports = [
|
||||
./opencode.nix
|
||||
./pi.nix
|
||||
];
|
||||
|
||||
coding.agents.skills = {
|
||||
agentsInput = inputs.agents;
|
||||
externalSkills = [
|
||||
{
|
||||
src = inputs.skills-anthropic;
|
||||
selectSkills = ["pdf" "docx" "frontend-design"];
|
||||
}
|
||||
{src = inputs.skills-vercel;}
|
||||
{src = inputs.skills-basecamp;}
|
||||
{src = inputs.skills-kestra;}
|
||||
];
|
||||
};
|
||||
|
||||
programs.mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
DeepWiki = {
|
||||
url = "https://mcp.deepwiki.com/mcp";
|
||||
};
|
||||
Ref = {
|
||||
command = "bash";
|
||||
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
|
||||
};
|
||||
Exa = {
|
||||
command = "bash";
|
||||
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
|
||||
};
|
||||
Outline = {
|
||||
url = "https://wiki.az-gruppe.com/mcp";
|
||||
};
|
||||
ContextMode = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx context-mode@latest"];
|
||||
};
|
||||
Honcho = {
|
||||
command = "bash";
|
||||
args = [
|
||||
"-c"
|
||||
''exec bunx mcp-remote@latest https://mcp.honcho.dev --header "Authorization:Bearer $(cat /run/agenix/honcho-key)" --header "X-Honcho-User-Name:m3tam3re"''
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
agenix-cli
|
||||
agent-browser
|
||||
alejandra
|
||||
bc
|
||||
bun
|
||||
devpod
|
||||
#devpod-desktop
|
||||
gnumake
|
||||
cmake
|
||||
(python3.withPackages (ps:
|
||||
with ps; [
|
||||
pip
|
||||
uv
|
||||
# Scientific packages
|
||||
numba
|
||||
numpy
|
||||
torch
|
||||
srt
|
||||
]))
|
||||
pyrefly
|
||||
nixd
|
||||
nix-update
|
||||
nodejs
|
||||
# opencode-desktop
|
||||
(qmd.override {
|
||||
vulkanSupport = videoDrivers == ["amdgpu"];
|
||||
cudaSupport = videoDrivers == ["nvidia"];
|
||||
})
|
||||
openshell
|
||||
openspec
|
||||
pi-coding-agent
|
||||
alejandra
|
||||
sidecar
|
||||
tailwindcss
|
||||
tailwindcss-language-server
|
||||
td
|
||||
];
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
coding.agents.opencode = {
|
||||
enable = true;
|
||||
agentsInput = inputs.agents;
|
||||
};
|
||||
|
||||
coding.opencode = {
|
||||
enable = true;
|
||||
|
||||
ohMyOpencodeSettings = {
|
||||
agents = {
|
||||
sisyphus.model = "litellm/claude-opus-4-6";
|
||||
oracle.model = "litellm/claude-sonnet-4-6";
|
||||
librarian.model = "litellm/claude-sonnet-4-6";
|
||||
explore.model = "litellm/claude-haiku-4-5";
|
||||
multimodal-looker.model = "litellm/gpt-5.3-codex";
|
||||
prometheus.model = "litellm/claude-opus-4-6";
|
||||
metis.model = "litellm/claude-opus-4-6";
|
||||
momus.model = "litellm/claude-opus-4-6";
|
||||
atlas.model = "litellm/claude-sonnet-4-6";
|
||||
};
|
||||
categories = {
|
||||
visual-engineering.model = "zai-coding-plan/glm-5.1";
|
||||
ultrabrain.model = "litellm/claude-opus-4-6";
|
||||
deep.model = "litellm/claude-sonnet-4-6";
|
||||
artistry.model = "zai-coding-plan/glm-5.1";
|
||||
quick.model = "litellm/claude-haiku-4-5";
|
||||
unspecified-low.model = "litellm/claude-sonnet-4-6";
|
||||
unspecified-high.model = "litellm/claude-opus-4-6";
|
||||
writing.model = "zai-coding-plan/glm-5.1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Keep TUI settings in programs.opencode.tui to satisfy OpenCode v1.2.15+.
|
||||
programs.opencode.tui.theme = "opencode";
|
||||
|
||||
# Override legacy default settings to avoid deprecated TUI keys in settings.
|
||||
programs.opencode.settings = lib.mkForce {
|
||||
plugin = ["oh-my-openagent"];
|
||||
formatter = {
|
||||
alejandra = {
|
||||
command = ["alejandra" "-q" "-"];
|
||||
extensions = [".nix"];
|
||||
};
|
||||
};
|
||||
|
||||
# AZ-Gruppe LiteLLM endpoint + available models
|
||||
provider = {
|
||||
litellm = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
name = "LiteLLM (AZ-Gruppe)";
|
||||
options.baseURL = "https://llm.az-gruppe.com/v1";
|
||||
models = {
|
||||
"gpt-5.2" = {
|
||||
name = "GPT-5.2";
|
||||
limit = {
|
||||
context = 400000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
"gpt-5.3-codex" = {
|
||||
name = "GPT-5.3 Codex";
|
||||
limit = {
|
||||
context = 400000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
"claude-haiku-4-5" = {
|
||||
name = "Claude Haiku 4.5";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 64000;
|
||||
};
|
||||
};
|
||||
"claude-sonnet-4-6" = {
|
||||
name = "Claude Sonnet 4.6";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 64000;
|
||||
};
|
||||
};
|
||||
"claude-opus-4-6" = {
|
||||
name = "Claude Opus 4.6";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
coding.agents.pi = {
|
||||
enable = true;
|
||||
agentsInput = inputs.agents;
|
||||
|
||||
modelOverrides = {
|
||||
chiron = "minimax/MiniMax-M2.7";
|
||||
chiron-forge = "minimax/MiniMax-M2.7";
|
||||
};
|
||||
|
||||
# Coding rules for Pi agent
|
||||
# Rules sourced from AGENTS repo
|
||||
codingRules = {
|
||||
# Language-specific rules
|
||||
languages = [
|
||||
"nix" # Nix language conventions
|
||||
];
|
||||
|
||||
# Standard concerns from AGENTS repo
|
||||
concerns = [
|
||||
"coding-style" # General coding principles
|
||||
"naming" # Naming conventions (camelCase, snake_case, etc.)
|
||||
"documentation" # Documentation standards
|
||||
"testing" # Testing guidelines (Arrange-Act-Assert)
|
||||
"git-workflow" # Conventional commits, branch naming
|
||||
"project-structure" # Project layout conventions
|
||||
];
|
||||
|
||||
# No framework-specific rules for NixOS config
|
||||
frameworks = [];
|
||||
};
|
||||
|
||||
settings = {
|
||||
packages = [
|
||||
"npm:@thesethrose/pi-zai-provider"
|
||||
"npm:pi-mcp-adapter"
|
||||
"npm:pi-subagents"
|
||||
"npm:pi-lens"
|
||||
"npm:pi-web-access"
|
||||
"npm:pi-prompt-template-model"
|
||||
"npm:@plannotator/pi-extension"
|
||||
"npm:pi-powerline-footer"
|
||||
"npm:pi-markdown-preview"
|
||||
"npm:pi-gsd"
|
||||
"npm:pi-tool-display"
|
||||
"npm:pi-agent-browser-native"
|
||||
"git:github.com/hk-vk/pi-connect"
|
||||
];
|
||||
|
||||
defaultProvider = "minimax";
|
||||
defaultModel = "MiniMax-M2.7";
|
||||
defaultThinkingLevel = "high";
|
||||
};
|
||||
|
||||
# MCP servers auto-inherited from programs.mcp in default.nix
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user