mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-13 04:21:08 +01:00
codex: init
This commit is contained in:
parent
7e3d76e7f7
commit
427c96044f
9 changed files with 118 additions and 0 deletions
2
tests/modules/programs/codex/custom-instructions.md
Normal file
2
tests/modules/programs/codex/custom-instructions.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
14
tests/modules/programs/codex/custom-instructions.nix
Normal file
14
tests/modules/programs/codex/custom-instructions.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
programs.codex = {
|
||||
enable = true;
|
||||
custom-instructions = ''
|
||||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.codex/AGENTS.md
|
||||
assertFileContent home-files/.codex/AGENTS.md \
|
||||
${./custom-instructions.md}
|
||||
'';
|
||||
}
|
||||
4
tests/modules/programs/codex/default.nix
Normal file
4
tests/modules/programs/codex/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
codex-settings = ./settings.nix;
|
||||
codex-custom-instructions = ./custom-instructions.nix;
|
||||
}
|
||||
21
tests/modules/programs/codex/settings.nix
Normal file
21
tests/modules/programs/codex/settings.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
programs.codex = {
|
||||
enable = true;
|
||||
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 \
|
||||
${./settings.yml}
|
||||
'';
|
||||
}
|
||||
7
tests/modules/programs/codex/settings.yml
Normal file
7
tests/modules/programs/codex/settings.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
model: gemma3:latest
|
||||
provider: ollama
|
||||
providers:
|
||||
ollama:
|
||||
baseURL: http://localhost:11434/v1
|
||||
envKey: OLLAMA_API_KEY
|
||||
name: Ollama
|
||||
Loading…
Add table
Add a link
Reference in a new issue