added separate aichat role

This commit is contained in:
Giulio De Pasquale 2024-05-27 13:38:59 +01:00
parent 3e2e530d49
commit a889960107

34
roles/home/aichat.nix Normal file
View File

@ -0,0 +1,34 @@
{ pkgs, ... }:
let
aichatConfigDir = "$HOME/.config/aichat";
aichatConfig = ''
model: ollama
clients:
- type: ollama
api_base: https://ollama.giugl.io
api_key: null
models:
- name: pino
max_input_tokens: null
- name: code-commenter
max_input_tokens: null
- name: git-commit-message
max_input_tokens: null
- type: claude
api_key: null
- type: openai
api_key: null
api_base: https://api.openai.com/v1
'';
in
{
home = {
sessionVariables = {
AICHAT_CONFIG_DIR = aichatConfigDir;
};
packages = [ pkgs.unstablePkgs.aichat ];
file.".config/aichat/config.yaml".text = aichatConfig;
};
}