feat: add gemini and codex config

This commit is contained in:
2026-04-21 17:06:30 +02:00
parent 8e713666a3
commit 6f363afbc8
6 changed files with 272 additions and 45 deletions
+64
View File
@@ -0,0 +1,64 @@
{ inputs, ... }:
let
sharedContext = ''
# AI Global Context
This shared Codex and Gemini context is intentionally minimal for now.
TODO: add persistent global AI instructions.
'';
in
{
flake.modules.nixos.ai = {
nixpkgs.overlays = [ inputs.llm-agents.overlays.default ];
nix.settings = {
extra-substituters = [ "https://cache.numtide.com" ];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
};
};
flake.modules.homeManager.ai =
{ config, pkgs, ... }:
{
home.sessionVariables.GEMINI_CONFIG_DIR = "${config.xdg.configHome}/gemini";
programs.gemini-cli = {
enable = true;
package = pkgs.llm-agents.gemini-cli;
context.AGENTS = sharedContext;
settings = {
context = {
fileName = [
"AGENTS.md"
"GEMINI.md"
];
loadMemoryFromIncludeDirectories = true;
};
model.name = "gemini-3.1-pro-preview";
};
};
programs.codex = {
enable = true;
package = pkgs.llm-agents.codex;
context = sharedContext;
settings = {
model = "gpt-5.4";
model_reasoning_effort = "high";
plan_mode_reasoning_effort = "high";
tui.status_line = [
"model-with-reasoning"
"current-dir"
"git-branch"
"context-remaining"
"five-hour-limit"
];
personality = "pragmatic";
features.undo = true;
};
};
};
}
+1 -1
View File
@@ -11,7 +11,7 @@ in
homeModules.git
homeModules.dev-tools
homeModules.podman
homeModules.gemini
homeModules.ai
];
};
}
-11
View File
@@ -1,11 +0,0 @@
{
flake.modules.homeManager.gemini =
{ config, ... }:
{
home.sessionVariables.GEMINI_CONFIG_DIR = "${config.xdg.configHome}/gemini";
programs.gemini-cli.enable = true;
programs.opencode.enable = true;
programs.npm.enable = true;
};
}
+1
View File
@@ -12,6 +12,7 @@ in
imports = [
nixosModules.meta
inputs.home-manager.nixosModules.home-manager
nixosModules.ai
nixosModules.nix
nixosModules.region-nl
];