1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 07:31:03 +01:00
home-manager/tests/modules/programs/codex/settings-yaml.nix
Thierry Delafontaine 502d9b7d30
codex: starting with v0.2.0 codex uses a TOML configuration file (#7388)
Updated related settings and test files to reflect the new format.
2025-07-06 08:58:22 -05:00

30 lines
662 B
Nix

{ pkgs, ... }:
let
codexPackage = pkgs.runCommand "codex-0.1.2504301751" { } ''
mkdir -p $out/bin
echo '#!/bin/sh' > $out/bin/codex
chmod +x $out/bin/codex
'';
in
{
programs.codex = {
enable = true;
package = codexPackage;
settings = {
model = "gemma3:latest";
provider = "ollama";
providers = {
ollama = {
name = "Ollama";
baseURL = "http://localhost:11434/v1";
envKey = "OLLAMA_API_KEY";
};
};
};
};
nmt.script = ''
assertFileExists home-files/.codex/config.yaml
assertFileContent home-files/.codex/config.yaml \
${./config.yaml}
'';
}