From c848303f1e0e58deafc2c6dc20c3b8caa3f7725c Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 19 Dec 2025 11:10:31 -0600 Subject: [PATCH] gemini-cli: don't force GEMINI_MODEL Default to null so user's can opt in to using this variable that will override configurations. Signed-off-by: Austin Horstman --- modules/programs/gemini-cli.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/programs/gemini-cli.nix b/modules/programs/gemini-cli.nix index accfdabf5..5e21543da 100644 --- a/modules/programs/gemini-cli.nix +++ b/modules/programs/gemini-cli.nix @@ -81,12 +81,12 @@ in }; defaultModel = lib.mkOption { - type = lib.types.str; - default = "gemini-2.5-pro"; + type = lib.types.nullOr lib.types.str; + default = null; example = "gemini-2.5-flash"; description = '' The default model to use for the CLI. - Will be set as $GEMINI_MODEL. + Will be set as $GEMINI_MODEL when configured. ''; }; @@ -138,7 +138,9 @@ in file.".gemini/settings.json" = lib.mkIf (cfg.settings != { }) { source = jsonFormat.generate "gemini-cli-settings.json" cfg.settings; }; - sessionVariables.GEMINI_MODEL = cfg.defaultModel; + sessionVariables = lib.mkIf (cfg.defaultModel != null) { + GEMINI_MODEL = cfg.defaultModel; + }; }; } {