2.home-manager/modules/programs/mistral-vibe.nix
Gaetan Lepage 436b27742c
Some checks are pending
/ triage (push) Waiting to run
GitHub Pages / publish (ubuntu-latest) (push) Waiting to run
mistral-vibe: add module
2026-02-20 22:25:11 -06:00

64 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.mistral-vibe;
settingsFormat = pkgs.formats.toml { };
in
{
meta.maintainers = [ lib.maintainers.GaetanLepage ];
options.programs.mistral-vibe = {
enable = lib.mkEnableOption "Mistral Vibe, Mistral's open-source CLI coding assistant";
package = lib.mkPackageOption pkgs "mistral-vibe" { nullable = true; };
settings = lib.mkOption {
type = settingsFormat.type;
example = lib.literalExpression ''
{
active_model = "devstral-latest";
vim_keybindings = false;
tool_paths = [];
providers = [
{
name = "mistral";
backend = "mistral";
api_base = "https://api.mistral.ai/v1";
api_key_env_var = "MISTRAL_API_KEY";
api_style = "openai";
}
];
models = [
{
name = "devstral-latest";
provider = "mistral";
alias = "devstral-latest";
temperature = 0.1;
input_price = 0.4;
output_price = 2.0;
}
];
}
'';
description = ''
Mistral Vibe configuration.
For available settings see <https://github.com/mistralai/mistral-vibe>.
'';
};
};
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.file.".vibe/config.toml".source = settingsFormat.generate "config.toml" cfg.settings;
};
}