manage shared Codex defaults
This commit is contained in:
1 parent
8d841863cb
commit
41bc61b363
2 files changed
+43
-8
No files matched your search
@@ -6,11 +6,48 @@ in
|
||||
{
|
||||
flake.modules.nixos.ai =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
codexConfig = (pkgs.formats.toml { }).generate "codex-config.toml" {
|
||||
model = "gpt-5.6-sol";
|
||||
model_reasoning_effort = "high";
|
||||
plan_mode_reasoning_effort = "high";
|
||||
service_tier = "default";
|
||||
approvals_reviewer = "auto_review";
|
||||
|
||||
tui = {
|
||||
status_line = [
|
||||
"model-with-reasoning"
|
||||
"current-dir"
|
||||
"context-remaining"
|
||||
"five-hour-limit"
|
||||
"weekly-limit"
|
||||
"git-branch"
|
||||
];
|
||||
status_line_use_colors = true;
|
||||
};
|
||||
|
||||
mcp_servers = {
|
||||
context7 = {
|
||||
url = "https://mcp.context7.com/mcp";
|
||||
env_http_headers.CONTEXT7_API_KEY = "CONTEXT7_API_KEY";
|
||||
};
|
||||
nixos = {
|
||||
command = "${pkgs.uv}/bin/uvx";
|
||||
args = [ "mcp-nixos" ];
|
||||
startup_timeout_sec = 60.0;
|
||||
tools.nix.approval_mode = "approve";
|
||||
};
|
||||
openaiDeveloperDocs.url = "https://developers.openai.com/mcp";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ nixosModules.podman ];
|
||||
|
||||
home-manager.sharedModules = [ hmModules.ai ];
|
||||
|
||||
environment.etc."codex/config.toml".source = codexConfig;
|
||||
|
||||
nixpkgs.overlays = [ inputs.llm-agents.overlays.shared-nixpkgs ];
|
||||
|
||||
nix.settings = {
|
||||
@@ -54,14 +91,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
programs.mcp = {
|
||||
enable = true;
|
||||
servers.nixos = {
|
||||
command = "${pkgs.uv}/bin/uvx";
|
||||
args = [ "mcp-nixos" ];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.llm-agents.codex
|
||||
pkgs.llm-agents.pi
|
||||
|
||||
Reference in new issue
Block a user