nixos/roles/home/aichat.nix
Giulio De Pasquale f8a716f8ba Use aichat flake
2024-06-02 01:39:58 +01:00

35 lines
728 B
Nix

{ 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: 32000
- name: git-commit-message
max_input_tokens: 32000
- 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;
};
}